From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Rast Subject: [PATCH 4/4] format-patch: support deep threading Date: Thu, 19 Feb 2009 22:26:33 +0100 Message-ID: <89a713f0418c31fcbc97f3019100779816f111b6.1235078708.git.trast@student.ethz.ch> References: <200902170027.09406.trast@student.ethz.ch> Cc: Junio C Hamano , Jakub Narebski , Jay Soffian , Daniel Barkalow To: git@vger.kernel.org X-From: git-owner@vger.kernel.org Thu Feb 19 22:28:48 2009 Return-path: Envelope-to: gcvg-git-2@gmane.org Received: from vger.kernel.org ([209.132.176.167]) by lo.gmane.org with esmtp (Exim 4.50) id 1LaGRm-0002Ns-HT for gcvg-git-2@gmane.org; Thu, 19 Feb 2009 22:28:43 +0100 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756377AbZBSV04 (ORCPT ); Thu, 19 Feb 2009 16:26:56 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756275AbZBSV0y (ORCPT ); Thu, 19 Feb 2009 16:26:54 -0500 Received: from xsmtp1.ethz.ch ([82.130.70.13]:21625 "EHLO xsmtp1.ethz.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756247AbZBSV0v (ORCPT ); Thu, 19 Feb 2009 16:26:51 -0500 Received: from xfe1.d.ethz.ch ([82.130.124.41]) by xsmtp1.ethz.ch with Microsoft SMTPSVC(6.0.3790.3959); Thu, 19 Feb 2009 22:26:44 +0100 Received: from localhost.localdomain ([129.132.153.233]) by xfe1.d.ethz.ch over TLS secured channel with Microsoft SMTPSVC(6.0.3790.3959); Thu, 19 Feb 2009 22:26:43 +0100 X-Mailer: git-send-email 1.6.2.rc1.295.g1e29 In-Reply-To: X-OriginalArrivalTime: 19 Feb 2009 21:26:43.0045 (UTC) FILETIME=[C27EC950:01C992D8] Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: For deep threading mode, i.e., the mode that gives a thread structured like + [PATCH 0/n] Cover letter `-+ [PATCH 1/n] First patch `-+ [PATCH 2/n] Second patch `-+ ... we currently have to use 'git send-email --thread' (the default). On the other hand, format-patch also has a --thread option which gives shallow mode, i.e., + [PATCH 0/n] Cover letter |-+ [PATCH 1/n] First patch |-+ [PATCH 2/n] Second patch ... To reduce the confusion resulting from having two indentically named features in different tools giving different results, let format-patch take an optional argument '--thread=deep' that gives the same output as 'send-mail --thread'. With no argument, or 'shallow', behave as before. Also add a configuration variable format.thread with the same semantics. Signed-off-by: Thomas Rast --- Documentation/config.txt | 10 +++ Documentation/git-format-patch.txt | 10 +++- builtin-log.c | 35 +++++++++- t/t4014-format-patch.sh | 120 ++++++++++++++++++++++++++++++++++++ 4 files changed, 170 insertions(+), 5 deletions(-) diff --git a/Documentation/config.txt b/Documentation/config.txt index f5152c5..300ab25 100644 --- a/Documentation/config.txt +++ b/Documentation/config.txt @@ -677,6 +677,16 @@ format.pretty:: See linkgit:git-log[1], linkgit:git-show[1], linkgit:git-whatchanged[1]. +format.thread:: + The default threading style for 'git-format-patch'. Can be + either a boolean value, `shallow` or `deep`. 'Shallow' + threading makes every mail a reply to the head of the series, + where the head is chosen from the cover letter, the + `\--in-reply-to`, and the first patch mail, in this order. + 'Deep' threading makes every mail a reply to the previous one. + A true boolean value is the same as `shallow`, and a false + value disables threading. + gc.aggressiveWindow:: The window size parameter used in the delta compression algorithm used by 'git-gc --aggressive'. This defaults diff --git a/Documentation/git-format-patch.txt b/Documentation/git-format-patch.txt index 11a7d77..4302b14 100644 --- a/Documentation/git-format-patch.txt +++ b/Documentation/git-format-patch.txt @@ -122,10 +122,18 @@ include::diff-options.txt[] which is the commit message and the patch itself in the second part, with "Content-Disposition: inline". ---thread:: +--thread[=