Git development
 help / color / mirror / Atom feed
* [PATCH] Documentation: customize diff-options depending on particular command
@ 2007-11-14 18:00 Sergei Organov
  0 siblings, 0 replies; only message in thread
From: Sergei Organov @ 2007-11-14 18:00 UTC (permalink / raw)
  To: git; +Cc: gitster

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 <osv@javad.com>
---
 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 ("<commit>..<commit>" and
 
 OPTIONS
 -------
+:git-diff: 1
 include::diff-options.txt[]
 
 <path>...::
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[]
 
 -<n>::
-- 
1.5.3.4

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2007-11-14 18:04 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-14 18:00 [PATCH] Documentation: customize diff-options depending on particular command Sergei Organov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox