From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sergei Organov Subject: [PATCH] Documentation: customize diff-options depending on particular command Date: Wed, 14 Nov 2007 21:00:57 +0300 Message-ID: <87ve843dr8.fsf@osv.gnss.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: gitster@pobox.com To: git@vger.kernel.org X-From: git-owner@vger.kernel.org Wed Nov 14 19:05:06 2007 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 1IsMbe-0001ps-Fq for gcvg-git-2@gmane.org; Wed, 14 Nov 2007 19:04:54 +0100 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758082AbXKNSEV (ORCPT ); Wed, 14 Nov 2007 13:04:21 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756435AbXKNSEU (ORCPT ); Wed, 14 Nov 2007 13:04:20 -0500 Received: from javad.com ([216.122.176.236]:3581 "EHLO javad.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756132AbXKNSET (ORCPT ); Wed, 14 Nov 2007 13:04:19 -0500 Received: from osv ([87.236.81.130]) by javad.com (8.11.6/8.11.0) with ESMTP id lAEI4H005258; Wed, 14 Nov 2007 18:04:17 GMT (envelope-from s.organov@javad.com) Received: from osv by osv with local (Exim 4.63) (envelope-from ) id 1IsMax-00021G-JA; Wed, 14 Nov 2007 21:04:11 +0300 User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) Sender: git-owner@vger.kernel.org Precedence: bulk X-Mailing-List: git@vger.kernel.org Archived-At: Customize diff-options depending on particular command as follows, mostly to make git-diff and git-format-patch manuals less confusing: * git-format-patch: - Mark --patch-with-stat as being the default. - Change -p description so that it matches what it actually does and so that it doesn't refer to absent "section on generating patches". * git-diff: mark -p as being the default. * git-diff-index/git-diff-files/git-diff-tree: mark --raw as being the default. Signed-off-by: Sergei Organov --- Documentation/diff-options.txt | 18 +++++++++++++++++- Documentation/git-diff.txt | 1 + Documentation/git-format-patch.txt | 1 + 3 files changed, 19 insertions(+), 1 deletions(-) diff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt index b1f528a..87f7ec1 100644 --- a/Documentation/diff-options.txt +++ b/Documentation/diff-options.txt @@ -1,5 +1,19 @@ +ifndef::git-format-patch[] +ifndef::git-diff[] +:git-diff-core: 1 +endif::git-diff[] +endif::git-format-patch[] + +ifdef::git-format-patch[] +-p:: + Generate patches without diffstat. +endif::git-format-patch[] + +ifndef::git-format-patch[] -p:: - Generate patch (see section on generating patches) + Generate patch (see section on generating patches). + {git-diff? This is the default.} +endif::git-format-patch[] -u:: Synonym for "-p". @@ -13,6 +27,7 @@ --raw:: Generate the raw format. + {git-diff-core? This is the default.} --patch-with-raw:: Synonym for "-p --raw". @@ -41,6 +56,7 @@ --patch-with-stat:: Synonym for "-p --stat". + {git-format-patch? This is the default.} -z:: NUL-line termination on output. This affects the --raw diff --git a/Documentation/git-diff.txt b/Documentation/git-diff.txt index 11c4216..2808a5e 100644 --- a/Documentation/git-diff.txt +++ b/Documentation/git-diff.txt @@ -75,6 +75,7 @@ and the range notations (".." and OPTIONS ------- +:git-diff: 1 include::diff-options.txt[] ...:: diff --git a/Documentation/git-format-patch.txt b/Documentation/git-format-patch.txt index f0617ef..268f227 100644 --- a/Documentation/git-format-patch.txt +++ b/Documentation/git-format-patch.txt @@ -65,6 +65,7 @@ reference. OPTIONS ------- +:git-format-patch: 1 include::diff-options.txt[] -:: -- 1.5.3.4