* [PATCH 1/2] Documentation: move options of git-diff-tree to a separate file.
@ 2008-04-26 21:01 Miklos Vajna
2008-04-26 21:01 ` [PATCH 2/2] Documentation: include diff-tree-options in git-show manpage Miklos Vajna
2008-04-27 0:24 ` [PATCH 1/2] Documentation: move options of git-diff-tree to a separate file Junio C Hamano
0 siblings, 2 replies; 11+ messages in thread
From: Miklos Vajna @ 2008-04-26 21:01 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
These options are used by high-level commands, like git-show; moving the
options to a separate file makes it possible to include the options in
the high-level manges as well.
Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
---
Documentation/diff-tree-options.txt | 64 +++++++++++++++++++++++++++++++++
Documentation/git-diff-tree.txt | 66 +---------------------------------
2 files changed, 66 insertions(+), 64 deletions(-)
create mode 100644 Documentation/diff-tree-options.txt
diff --git a/Documentation/diff-tree-options.txt b/Documentation/diff-tree-options.txt
new file mode 100644
index 0000000..24a47f4
--- /dev/null
+++ b/Documentation/diff-tree-options.txt
@@ -0,0 +1,64 @@
+-r::
+ recurse into sub-trees
+
+-t::
+ show tree entry itself as well as subtrees. Implies -r.
+
+--root::
+ When '--root' is specified the initial commit will be showed as a big
+ creation event. This is equivalent to a diff against the NULL tree.
+
+--stdin::
+ When '--stdin' is specified, the command does not take
+ <tree-ish> arguments from the command line. Instead, it
+ reads either one <commit> or a pair of <tree-ish>
+ separated with a single space from its standard input.
++
+When a single commit is given on one line of such input, it compares
+the commit with its parents. The following flags further affects its
+behavior. This does not apply to the case where two <tree-ish>
+separated with a single space are given.
+
+-m::
+ By default, "--stdin" does not show
+ differences for merge commits. With this flag, it shows
+ differences to that commit from all of its parents. See
+ also '-c'.
+
+-s::
+ By default, "--stdin" shows differences,
+ either in machine-readable form (without '-p') or in patch
+ form (with '-p'). This output can be suppressed. It is
+ only useful with '-v' flag.
+
+-v::
+ This flag causes "--stdin" to also show
+ the commit message before the differences.
+
+--no-commit-id::
+ The output contains a line with the commit ID when
+ applicable. This flag suppressed the commit ID output.
+
+-c::
+ This flag changes the way a merge commit is displayed
+ (which means it is useful only when the command is given
+ one <tree-ish>, or '--stdin'). It shows the differences
+ from each of the parents to the merge result simultaneously
+ instead of showing pairwise diff between a parent and the
+ result one at a time (which is what the '-m' option does).
+ Furthermore, it lists only files which were modified
+ from all parents.
+
+--cc::
+ This flag changes the way a merge commit patch is displayed,
+ in a similar way to the '-c' option. It implies the '-c'
+ and '-p' options and further compresses the patch output
+ by omitting hunks that show differences from only one
+ parent, or show the same change from all but one parent
+ for an Octopus merge. When this optimization makes all
+ hunks disappear, the commit itself and the commit log
+ message is not shown, just like in any other "empty diff" case.
+
+--always::
+ Show the commit itself and the commit log message even
+ if the diff itself is empty.
diff --git a/Documentation/git-diff-tree.txt b/Documentation/git-diff-tree.txt
index 58d02c6..b91cbde 100644
--- a/Documentation/git-diff-tree.txt
+++ b/Documentation/git-diff-tree.txt
@@ -36,72 +36,10 @@ include::diff-options.txt[]
Note that this parameter does not provide any wildcard or regexp
features.
--r::
- recurse into sub-trees
-
--t::
- show tree entry itself as well as subtrees. Implies -r.
-
---root::
- When '--root' is specified the initial commit will be showed as a big
- creation event. This is equivalent to a diff against the NULL tree.
-
---stdin::
- When '--stdin' is specified, the command does not take
- <tree-ish> arguments from the command line. Instead, it
- reads either one <commit> or a pair of <tree-ish>
- separated with a single space from its standard input.
-+
-When a single commit is given on one line of such input, it compares
-the commit with its parents. The following flags further affects its
-behavior. This does not apply to the case where two <tree-ish>
-separated with a single space are given.
-
--m::
- By default, "git-diff-tree --stdin" does not show
- differences for merge commits. With this flag, it shows
- differences to that commit from all of its parents. See
- also '-c'.
-
--s::
- By default, "git-diff-tree --stdin" shows differences,
- either in machine-readable form (without '-p') or in patch
- form (with '-p'). This output can be suppressed. It is
- only useful with '-v' flag.
-
--v::
- This flag causes "git-diff-tree --stdin" to also show
- the commit message before the differences.
+include::diff-tree-options.txt[]
-include::pretty-options.txt[]
---no-commit-id::
- git-diff-tree outputs a line with the commit ID when
- applicable. This flag suppressed the commit ID output.
-
--c::
- This flag changes the way a merge commit is displayed
- (which means it is useful only when the command is given
- one <tree-ish>, or '--stdin'). It shows the differences
- from each of the parents to the merge result simultaneously
- instead of showing pairwise diff between a parent and the
- result one at a time (which is what the '-m' option does).
- Furthermore, it lists only files which were modified
- from all parents.
-
---cc::
- This flag changes the way a merge commit patch is displayed,
- in a similar way to the '-c' option. It implies the '-c'
- and '-p' options and further compresses the patch output
- by omitting hunks that show differences from only one
- parent, or show the same change from all but one parent
- for an Octopus merge. When this optimization makes all
- hunks disappear, the commit itself and the commit log
- message is not shown, just like in any other "empty diff" case.
-
---always::
- Show the commit itself and the commit log message even
- if the diff itself is empty.
+include::pretty-options.txt[]
include::pretty-formats.txt[]
--
1.5.5.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 2/2] Documentation: include diff-tree-options in git-show manpage.
2008-04-26 21:01 [PATCH 1/2] Documentation: move options of git-diff-tree to a separate file Miklos Vajna
@ 2008-04-26 21:01 ` Miklos Vajna
2008-04-27 0:24 ` [PATCH 1/2] Documentation: move options of git-diff-tree to a separate file Junio C Hamano
1 sibling, 0 replies; 11+ messages in thread
From: Miklos Vajna @ 2008-04-26 21:01 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
---
Documentation/git-show.txt | 9 +++------
1 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/Documentation/git-show.txt b/Documentation/git-show.txt
index dccf0e2..b1fa879 100644
--- a/Documentation/git-show.txt
+++ b/Documentation/git-show.txt
@@ -25,12 +25,6 @@ with \--name-only).
For plain blobs, it shows the plain contents.
-The command takes options applicable to the linkgit:git-diff-tree[1] command to
-control how the changes the commit introduces are shown.
-
-This manual page describes only the most frequently used options.
-
-
OPTIONS
-------
<object>::
@@ -38,6 +32,9 @@ OPTIONS
For a more complete list of ways to spell object names, see
"SPECIFYING REVISIONS" section in linkgit:git-rev-parse[1].
+include::diff-tree-options.txt[]
+
+
include::pretty-options.txt[]
--
1.5.5.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH 1/2] Documentation: move options of git-diff-tree to a separate file.
2008-04-26 21:01 [PATCH 1/2] Documentation: move options of git-diff-tree to a separate file Miklos Vajna
2008-04-26 21:01 ` [PATCH 2/2] Documentation: include diff-tree-options in git-show manpage Miklos Vajna
@ 2008-04-27 0:24 ` Junio C Hamano
2008-04-27 2:17 ` [PATCH] " Miklos Vajna
` (2 more replies)
1 sibling, 3 replies; 11+ messages in thread
From: Junio C Hamano @ 2008-04-27 0:24 UTC (permalink / raw)
To: Miklos Vajna; +Cc: git
Miklos Vajna <vmiklos@frugalware.org> writes:
> +--stdin::
> + When '--stdin' is specified, the command does not take
> + <tree-ish> arguments from the command line. Instead, it
> + reads either one <commit> or a pair of <tree-ish>
> + separated with a single space from its standard input.
Are you sure "git show" takes --stdin?
Also for "show", listing --cc as one of the options does not make much
sense, as that is an unoverridable default.
And no, making it overridable so that it can take -m to show independent
diff against each parent of a merge commit do not make much sense in the
context of "git show".
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH] Documentation: move options of git-diff-tree to a separate file.
2008-04-27 0:24 ` [PATCH 1/2] Documentation: move options of git-diff-tree to a separate file Junio C Hamano
@ 2008-04-27 2:17 ` Miklos Vajna
2008-04-27 7:29 ` しらいしななこ
[not found] ` <200804270730.m3R7UTTp011092@mi1.bluebottle.com>
2 siblings, 0 replies; 11+ messages in thread
From: Miklos Vajna @ 2008-04-27 2:17 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
These options are used by high-level commands, like git-show; moving the
options to a separate file makes it possible to include the options in
the high-level manges as well.
Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
---
On Sat, Apr 26, 2008 at 05:24:57PM -0700, Junio C Hamano <gitster@pobox.com> wrote:
> Are you sure "git show" takes --stdin?
>
> Also for "show", listing --cc as one of the options does not make much
> sense, as that is an unoverridable default.
>
> And no, making it overridable so that it can take -m to show
> independent
> diff against each parent of a merge commit do not make much sense in
> the
> context of "git show".
Right, --stdin and --cc is not something I should move
to diff-tree-options.txt. Updated patch below.
Documentation/diff-tree-options.txt | 43 ++++++++++++++++++++++++++++++
Documentation/git-diff-tree.txt | 49 +++--------------------------------
2 files changed, 47 insertions(+), 45 deletions(-)
create mode 100644 Documentation/diff-tree-options.txt
diff --git a/Documentation/diff-tree-options.txt b/Documentation/diff-tree-options.txt
new file mode 100644
index 0000000..3049ede
--- /dev/null
+++ b/Documentation/diff-tree-options.txt
@@ -0,0 +1,43 @@
+-r::
+ recurse into sub-trees
+
+-t::
+ show tree entry itself as well as subtrees. Implies -r.
+
+--root::
+ When '--root' is specified the initial commit will be showed as a big
+ creation event. This is equivalent to a diff against the NULL tree.
+
+-m::
+ By default, "--stdin" does not show
+ differences for merge commits. With this flag, it shows
+ differences to that commit from all of its parents. See
+ also '-c'.
+
+-s::
+ By default, "--stdin" shows differences,
+ either in machine-readable form (without '-p') or in patch
+ form (with '-p'). This output can be suppressed. It is
+ only useful with '-v' flag.
+
+-v::
+ This flag causes "--stdin" to also show
+ the commit message before the differences.
+
+--no-commit-id::
+ The output contains a line with the commit ID when
+ applicable. This flag suppressed the commit ID output.
+
+-c::
+ This flag changes the way a merge commit is displayed
+ (which means it is useful only when the command is given
+ one <tree-ish>, or '--stdin'). It shows the differences
+ from each of the parents to the merge result simultaneously
+ instead of showing pairwise diff between a parent and the
+ result one at a time (which is what the '-m' option does).
+ Furthermore, it lists only files which were modified
+ from all parents.
+
+--always::
+ Show the commit itself and the commit log message even
+ if the diff itself is empty.
diff --git a/Documentation/git-diff-tree.txt b/Documentation/git-diff-tree.txt
index 58d02c6..55345df 100644
--- a/Documentation/git-diff-tree.txt
+++ b/Documentation/git-diff-tree.txt
@@ -36,16 +36,6 @@ include::diff-options.txt[]
Note that this parameter does not provide any wildcard or regexp
features.
--r::
- recurse into sub-trees
-
--t::
- show tree entry itself as well as subtrees. Implies -r.
-
---root::
- When '--root' is specified the initial commit will be showed as a big
- creation event. This is equivalent to a diff against the NULL tree.
-
--stdin::
When '--stdin' is specified, the command does not take
<tree-ish> arguments from the command line. Instead, it
@@ -57,38 +47,6 @@ the commit with its parents. The following flags further affects its
behavior. This does not apply to the case where two <tree-ish>
separated with a single space are given.
--m::
- By default, "git-diff-tree --stdin" does not show
- differences for merge commits. With this flag, it shows
- differences to that commit from all of its parents. See
- also '-c'.
-
--s::
- By default, "git-diff-tree --stdin" shows differences,
- either in machine-readable form (without '-p') or in patch
- form (with '-p'). This output can be suppressed. It is
- only useful with '-v' flag.
-
--v::
- This flag causes "git-diff-tree --stdin" to also show
- the commit message before the differences.
-
-include::pretty-options.txt[]
-
---no-commit-id::
- git-diff-tree outputs a line with the commit ID when
- applicable. This flag suppressed the commit ID output.
-
--c::
- This flag changes the way a merge commit is displayed
- (which means it is useful only when the command is given
- one <tree-ish>, or '--stdin'). It shows the differences
- from each of the parents to the merge result simultaneously
- instead of showing pairwise diff between a parent and the
- result one at a time (which is what the '-m' option does).
- Furthermore, it lists only files which were modified
- from all parents.
-
--cc::
This flag changes the way a merge commit patch is displayed,
in a similar way to the '-c' option. It implies the '-c'
@@ -99,9 +57,10 @@ include::pretty-options.txt[]
hunks disappear, the commit itself and the commit log
message is not shown, just like in any other "empty diff" case.
---always::
- Show the commit itself and the commit log message even
- if the diff itself is empty.
+include::diff-tree-options.txt[]
+
+
+include::pretty-options.txt[]
include::pretty-formats.txt[]
--
1.5.5.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH] Documentation: move options of git-diff-tree to a separate file.
2008-04-27 0:24 ` [PATCH 1/2] Documentation: move options of git-diff-tree to a separate file Junio C Hamano
2008-04-27 2:17 ` [PATCH] " Miklos Vajna
@ 2008-04-27 7:29 ` しらいしななこ
[not found] ` <200804270730.m3R7UTTp011092@mi1.bluebottle.com>
2 siblings, 0 replies; 11+ messages in thread
From: しらいしななこ @ 2008-04-27 7:29 UTC (permalink / raw)
To: Miklos Vajna; +Cc: Junio C Hamano, git
Quoting Miklos Vajna <vmiklos@frugalware.org>:
> On Sat, Apr 26, 2008 at 05:24:57PM -0700, Junio C Hamano <gitster@pobox.com> wrote:
>> Are you sure "git show" takes --stdin?
>>
>> Also for "show", listing --cc as one of the options does not make much
>> sense, as that is an unoverridable default.
>>
>> And no, making it overridable so that it can take -m to show
>> independent
>> diff against each parent of a merge commit do not make much sense in
>> the
>> context of "git show".
>
> Right, --stdin and --cc is not something I should move
> to diff-tree-options.txt. Updated patch below.
I do not know if the updated patch is correct either.
Did you try "git show" with the options you have in the new "tree-options" file, for example "git show --root HEAD", and checked to make sure they make sense?
I think "git show -s" makes sense as it is easier to type than "git log -1" but I do not think any other options you listed makes sense with "git show".
>
> Documentation/diff-tree-options.txt | 43 ++++++++++++++++++++++++++++++
> Documentation/git-diff-tree.txt | 49 +++--------------------------------
> 2 files changed, 47 insertions(+), 45 deletions(-)
> create mode 100644 Documentation/diff-tree-options.txt
>
> diff --git a/Documentation/diff-tree-options.txt b/Documentation/diff-tree-options.txt
> new file mode 100644
> index 0000000..3049ede
> --- /dev/null
> +++ b/Documentation/diff-tree-options.txt
> @@ -0,0 +1,43 @@
> +-r::
> + recurse into sub-trees
> +
> +-t::
> + show tree entry itself as well as subtrees. Implies -r.
> +
> +--root::
> + When '--root' is specified the initial commit will be showed as a big
> + creation event. This is equivalent to a diff against the NULL tree.
> +
> +-m::
> + By default, "--stdin" does not show
> + differences for merge commits. With this flag, it shows
> + differences to that commit from all of its parents. See
> + also '-c'.
> +
> +-s::
> + By default, "--stdin" shows differences,
> + either in machine-readable form (without '-p') or in patch
> + form (with '-p'). This output can be suppressed. It is
> + only useful with '-v' flag.
> +
> +-v::
> + This flag causes "--stdin" to also show
> + the commit message before the differences.
> +
> +--no-commit-id::
> + The output contains a line with the commit ID when
> + applicable. This flag suppressed the commit ID output.
> +
> +-c::
> + This flag changes the way a merge commit is displayed
> + (which means it is useful only when the command is given
> + one <tree-ish>, or '--stdin'). It shows the differences
> + from each of the parents to the merge result simultaneously
> + instead of showing pairwise diff between a parent and the
> + result one at a time (which is what the '-m' option does).
> + Furthermore, it lists only files which were modified
> + from all parents.
> +
> +--always::
> + Show the commit itself and the commit log message even
> + if the diff itself is empty.
> diff --git a/Documentation/git-diff-tree.txt b/Documentation/git-diff-tree.txt
> index 58d02c6..55345df 100644
> --- a/Documentation/git-diff-tree.txt
> +++ b/Documentation/git-diff-tree.txt
> @@ -36,16 +36,6 @@ include::diff-options.txt[]
> Note that this parameter does not provide any wildcard or regexp
> features.
>
> --r::
> - recurse into sub-trees
> -
> --t::
> - show tree entry itself as well as subtrees. Implies -r.
> -
> ---root::
> - When '--root' is specified the initial commit will be showed as a big
> - creation event. This is equivalent to a diff against the NULL tree.
> -
> --stdin::
> When '--stdin' is specified, the command does not take
> <tree-ish> arguments from the command line. Instead, it
> @@ -57,38 +47,6 @@ the commit with its parents. The following flags further affects its
> behavior. This does not apply to the case where two <tree-ish>
> separated with a single space are given.
>
> --m::
> - By default, "git-diff-tree --stdin" does not show
> - differences for merge commits. With this flag, it shows
> - differences to that commit from all of its parents. See
> - also '-c'.
> -
> --s::
> - By default, "git-diff-tree --stdin" shows differences,
> - either in machine-readable form (without '-p') or in patch
> - form (with '-p'). This output can be suppressed. It is
> - only useful with '-v' flag.
> -
> --v::
> - This flag causes "git-diff-tree --stdin" to also show
> - the commit message before the differences.
> -
> -include::pretty-options.txt[]
> -
> ---no-commit-id::
> - git-diff-tree outputs a line with the commit ID when
> - applicable. This flag suppressed the commit ID output.
> -
> --c::
> - This flag changes the way a merge commit is displayed
> - (which means it is useful only when the command is given
> - one <tree-ish>, or '--stdin'). It shows the differences
> - from each of the parents to the merge result simultaneously
> - instead of showing pairwise diff between a parent and the
> - result one at a time (which is what the '-m' option does).
> - Furthermore, it lists only files which were modified
> - from all parents.
> -
> --cc::
> This flag changes the way a merge commit patch is displayed,
> in a similar way to the '-c' option. It implies the '-c'
> @@ -99,9 +57,10 @@ include::pretty-options.txt[]
> hunks disappear, the commit itself and the commit log
> message is not shown, just like in any other "empty diff" case.
>
> ---always::
> - Show the commit itself and the commit log message even
> - if the diff itself is empty.
> +include::diff-tree-options.txt[]
> +
> +
> +include::pretty-options.txt[]
>
>
> include::pretty-formats.txt[]
> --
> 1.5.5.1
--
Nanako Shiraishi
http://ivory.ap.teacup.com/nanako3/
----------------------------------------------------------------------
Free pop3 email with a spam filter.
http://www.bluebottle.com/tag/5
^ permalink raw reply [flat|nested] 11+ messages in thread
[parent not found: <200804270730.m3R7UTTp011092@mi1.bluebottle.com>]
* [PATCH] git show documentation: no longer refer to git-diff-tree options
[not found] ` <200804270730.m3R7UTTp011092@mi1.bluebottle.com>
@ 2008-04-27 11:45 ` Miklos Vajna
2008-04-27 17:33 ` Junio C Hamano
0 siblings, 1 reply; 11+ messages in thread
From: Miklos Vajna @ 2008-04-27 11:45 UTC (permalink / raw)
To: Junio C Hamano; +Cc: nanako3, git
The only git-diff-tree option that makes sense with git-show is '-s',
but (from a user's point of view) it has sightly different meaning,
since you don't have a --stdin option when using git-show.
This patch removes the reference to git-diff-tree options and adds
documentation for '-s', in the context of git-show.
Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
---
On Sun, Apr 27, 2008 at 04:29:55PM +0900, nanako3@bluebottle.com wrote:
> I do not know if the updated patch is correct either.
>
> Did you try "git show" with the options you have in the new
> "tree-options" file, for example "git show --root HEAD", and checked
> to make sure they make sense?
The initial problem I tried to solve with this patch is to avoid the
situation, when you try to figure out what 'git show --foo' does and you
can't find that option in man git-show, which is a usability problem, I
think.
> I think "git show -s" makes sense as it is easier to type than "git
> log -1" but I do not think any other options you listed makes sense
> with "git show".
I just checked each option one by one and right, I haven't found any
other option that could be useful for git-show either. Given that the
wording of -s for git-show is quite different, I think it would be
easier to just document -s in git-show as well. Like this?
Thanks.
Documentation/git-show.txt | 9 +++------
1 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/Documentation/git-show.txt b/Documentation/git-show.txt
index dccf0e2..299b611 100644
--- a/Documentation/git-show.txt
+++ b/Documentation/git-show.txt
@@ -25,12 +25,6 @@ with \--name-only).
For plain blobs, it shows the plain contents.
-The command takes options applicable to the linkgit:git-diff-tree[1] command to
-control how the changes the commit introduces are shown.
-
-This manual page describes only the most frequently used options.
-
-
OPTIONS
-------
<object>::
@@ -38,6 +32,9 @@ OPTIONS
For a more complete list of ways to spell object names, see
"SPECIFYING REVISIONS" section in linkgit:git-rev-parse[1].
+-s::
+ Don't show a textural diff for commits.
+
include::pretty-options.txt[]
--
1.5.5.1.91.g499fc.dirty
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH] git show documentation: no longer refer to git-diff-tree options
2008-04-27 11:45 ` [PATCH] git show documentation: no longer refer to git-diff-tree options Miklos Vajna
@ 2008-04-27 17:33 ` Junio C Hamano
2008-05-11 22:37 ` Miklos Vajna
0 siblings, 1 reply; 11+ messages in thread
From: Junio C Hamano @ 2008-04-27 17:33 UTC (permalink / raw)
To: Miklos Vajna; +Cc: nanako3, git
Miklos Vajna <vmiklos@frugalware.org> writes:
> I just checked each option one by one and right, I haven't found any
> other option that could be useful for git-show either. Given that the
> wording of -s for git-show is quite different, I think it would be
> easier to just document -s in git-show as well. Like this?
Hmm, yes but not exactly.
You lost --stat, --name-only and friends that were implied by mentioning
"diff-tree".
I agree your _motivation_ behind your original patch is good. Saying "see
also that page if you want to do very exotic and rarely useful operation"
is one thing, but saying "described are most often used ones" and not
describing enough is bad.
Perhaps we would want to include diff-options.txt. There may be some
options that are no-op or always-on in the context of "git show" in the
file, but we already have an infrastracture to turn parts of the inclusion
on and off depending on which manual page includes it.
> diff --git a/Documentation/git-show.txt b/Documentation/git-show.txt
> index dccf0e2..299b611 100644
> --- a/Documentation/git-show.txt
> +++ b/Documentation/git-show.txt
> @@ -25,12 +25,6 @@ with \--name-only).
>
> For plain blobs, it shows the plain contents.
>
> -The command takes options applicable to the linkgit:git-diff-tree[1] command to
> -control how the changes the commit introduces are shown.
> -
> -This manual page describes only the most frequently used options.
> -
> -
> OPTIONS
> -------
> <object>::
> @@ -38,6 +32,9 @@ OPTIONS
> For a more complete list of ways to spell object names, see
> "SPECIFYING REVISIONS" section in linkgit:git-rev-parse[1].
>
> +-s::
> + Don't show a textural diff for commits.
> +
> include::pretty-options.txt[]
>
>
> --
> 1.5.5.1.91.g499fc.dirty
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH] git show documentation: no longer refer to git-diff-tree options
2008-04-27 17:33 ` Junio C Hamano
@ 2008-05-11 22:37 ` Miklos Vajna
2008-05-12 23:10 ` Junio C Hamano
0 siblings, 1 reply; 11+ messages in thread
From: Miklos Vajna @ 2008-05-11 22:37 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git, nanako3
The only git-diff-tree option that makes sense with git-show is '-s',
but (from a user's point of view) it has sightly different meaning,
since you don't have a --stdin option when using git-show.
This patch removes the reference to git-diff-tree options and adds
documentation for '-s', in the context of git-show.
It also includes git-diff options, but excludes the ones which are not
relevant for this command.
Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
---
On Sun, Apr 27, 2008 at 10:33:26AM -0700, Junio C Hamano <gitster@pobox.com> wrote:
> Hmm, yes but not exactly.
>
> You lost --stat, --name-only and friends that were implied by
> mentioning
> "diff-tree".
>
> I agree your _motivation_ behind your original patch is good. Saying
> "see
> also that page if you want to do very exotic and rarely useful
> operation"
> is one thing, but saying "described are most often used ones" and not
> describing enough is bad.
>
> Perhaps we would want to include diff-options.txt. There may be some
> options that are no-op or always-on in the context of "git show" in
> the
> file, but we already have an infrastracture to turn parts of the
> inclusion
> on and off depending on which manual page includes it.
This patch implements this, I hope.
(Sorry for the delay, BTW.)
Documentation/diff-options.txt | 10 ++++++++++
Documentation/git-show.txt | 14 ++++++++------
2 files changed, 18 insertions(+), 6 deletions(-)
diff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt
index 13234fa..af7846d 100644
--- a/Documentation/diff-options.txt
+++ b/Documentation/diff-options.txt
@@ -17,6 +17,7 @@ ifdef::git-format-patch[]
Generate patches without diffstat.
endif::git-format-patch[]
+ifndef::git-show[]
ifndef::git-format-patch[]
-p::
Generate patch (see section on generating patches).
@@ -25,6 +26,7 @@ endif::git-format-patch[]
-u::
Synonym for "-p".
+endif::git-show[]
-U<n>::
Shorthand for "--unified=<n>".
@@ -37,8 +39,10 @@ endif::git-format-patch[]
Generate the raw format.
{git-diff-core? This is the default.}
+ifndef::git-show[]
--patch-with-raw::
Synonym for "-p --raw".
+endif::git-show[]
--stat[=width[,name-width]]::
Generate a diffstat. You can override the default
@@ -70,6 +74,7 @@ endif::git-format-patch[]
Output a condensed summary of extended header information
such as creations, renames and mode changes.
+ifndef::git-show[]
--patch-with-stat::
Synonym for "-p --stat".
{git-format-patch? This is the default.}
@@ -78,6 +83,7 @@ endif::git-format-patch[]
NUL-line termination on output. This affects the --raw
output field terminator. Also output from commands such
as "git-log" will be delimited with NUL between commits.
+endif::git-show[]
--name-only::
Show only names of changed files.
@@ -159,6 +165,7 @@ endif::git-format-patch[]
the number of rename/copy targets exceeds the specified
number.
+ifndef::git-show[]
-S<string>::
Look for differences that contain the change in <string>.
@@ -170,6 +177,7 @@ endif::git-format-patch[]
--pickaxe-regex::
Make the <string> not a plain string but an extended POSIX
regex to match.
+endif::git-show[]
-O<orderfile>::
Output the patch in the order specified in the
@@ -212,6 +220,7 @@ endif::git-format-patch[]
-w::
Shorthand for "--ignore-all-space".
+ifndef::git-show[]
--exit-code::
Make the program exit with codes similar to diff(1).
That is, it exits with 1 if there were differences and
@@ -219,6 +228,7 @@ endif::git-format-patch[]
--quiet::
Disable all output of the program. Implies --exit-code.
+endif::git-show[]
--ext-diff::
Allow an external diff helper to be executed. If you set an
diff --git a/Documentation/git-show.txt b/Documentation/git-show.txt
index dccf0e2..6b5c3fb 100644
--- a/Documentation/git-show.txt
+++ b/Documentation/git-show.txt
@@ -25,12 +25,6 @@ with \--name-only).
For plain blobs, it shows the plain contents.
-The command takes options applicable to the linkgit:git-diff-tree[1] command to
-control how the changes the commit introduces are shown.
-
-This manual page describes only the most frequently used options.
-
-
OPTIONS
-------
<object>::
@@ -38,6 +32,14 @@ OPTIONS
For a more complete list of ways to spell object names, see
"SPECIFYING REVISIONS" section in linkgit:git-rev-parse[1].
+-s, --quiet::
+ Don't show a textural diff for commits.
+
+
+:git-show: 1
+include::diff-options.txt[]
+
+
include::pretty-options.txt[]
--
1.5.5.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH] git show documentation: no longer refer to git-diff-tree options
2008-05-11 22:37 ` Miklos Vajna
@ 2008-05-12 23:10 ` Junio C Hamano
2008-05-13 9:11 ` Miklos Vajna
0 siblings, 1 reply; 11+ messages in thread
From: Junio C Hamano @ 2008-05-12 23:10 UTC (permalink / raw)
To: Miklos Vajna; +Cc: git, nanako3
Miklos Vajna <vmiklos@frugalware.org> writes:
> This patch implements this, I hope.
>
> (Sorry for the delay, BTW.)
No problem. Thanks.
> diff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt
> index 13234fa..af7846d 100644
> --- a/Documentation/diff-options.txt
> +++ b/Documentation/diff-options.txt
> @@ -17,6 +17,7 @@ ifdef::git-format-patch[]
> Generate patches without diffstat.
> endif::git-format-patch[]
Hmm. The symbol git-diff-core is defined for git-show and we say --raw is
the default for git-show because of it?
How about doing it this way instead?
---
Documentation/diff-options.txt | 22 +++++++++++++++++-----
Documentation/git-show.txt | 14 ++++++++------
2 files changed, 25 insertions(+), 11 deletions(-)
diff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt
index 13234fa..a478612 100644
--- a/Documentation/diff-options.txt
+++ b/Documentation/diff-options.txt
@@ -7,21 +7,33 @@
ifndef::git-format-patch[]
ifndef::git-diff[]
ifndef::git-log[]
+ifndef::git-show[]
:git-diff-core: 1
+endif::git-show[]
endif::git-log[]
endif::git-diff[]
endif::git-format-patch[]
+ifdef::git-diff[]
+:git-diff-p-is-default: 1
+endif::git-diff[]
+ifdef::git-show[]
+:git-diff-p-is-default: 1
+endif::git-show[]
ifdef::git-format-patch[]
+:git-diff-p-stat-is-default: 1
+endif::git-format-patch[]
+
+ifdef::git-diff-p-stat-is-default[]
-p::
Generate patches without diffstat.
-endif::git-format-patch[]
+endif::git-diff-p-stat-is-default[]
-ifndef::git-format-patch[]
+ifndef::git-diff-p-stat-is-default[]
-p::
Generate patch (see section on generating patches).
- {git-diff? This is the default.}
-endif::git-format-patch[]
+ {git-diff-p-is-default? This is the default.}
+endif::git-diff-p-stat-is-default[]
-u::
Synonym for "-p".
@@ -72,7 +84,7 @@ endif::git-format-patch[]
--patch-with-stat::
Synonym for "-p --stat".
- {git-format-patch? This is the default.}
+ {git-diff-p-stat-is-default? This is the default.}
-z::
NUL-line termination on output. This affects the --raw
diff --git a/Documentation/git-show.txt b/Documentation/git-show.txt
index dccf0e2..6b5c3fb 100644
--- a/Documentation/git-show.txt
+++ b/Documentation/git-show.txt
@@ -25,12 +25,6 @@ with \--name-only).
For plain blobs, it shows the plain contents.
-The command takes options applicable to the linkgit:git-diff-tree[1] command to
-control how the changes the commit introduces are shown.
-
-This manual page describes only the most frequently used options.
-
-
OPTIONS
-------
<object>::
@@ -38,6 +32,14 @@ OPTIONS
For a more complete list of ways to spell object names, see
"SPECIFYING REVISIONS" section in linkgit:git-rev-parse[1].
+-s, --quiet::
+ Don't show a textural diff for commits.
+
+
+:git-show: 1
+include::diff-options.txt[]
+
+
include::pretty-options.txt[]
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH] git show documentation: no longer refer to git-diff-tree options
2008-05-12 23:10 ` Junio C Hamano
@ 2008-05-13 9:11 ` Miklos Vajna
2008-05-13 9:16 ` Miklos Vajna
0 siblings, 1 reply; 11+ messages in thread
From: Miklos Vajna @ 2008-05-13 9:11 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git, nanako3
[-- Attachment #1: Type: text/plain, Size: 422 bytes --]
On Mon, May 12, 2008 at 04:10:09PM -0700, Junio C Hamano <gitster@pobox.com> wrote:
> Hmm. The symbol git-diff-core is defined for git-show and we say --raw is
> the default for git-show because of it?
Ouch, somehow I read infdef: as ifdef: so I intenionally did not add
git-show, but it was a mistake.
> How about doing it this way instead?
Sure, I like the idea of introducing the git-diff-p-stat-is-default
define.
[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] git show documentation: no longer refer to git-diff-tree options
2008-05-13 9:11 ` Miklos Vajna
@ 2008-05-13 9:16 ` Miklos Vajna
0 siblings, 0 replies; 11+ messages in thread
From: Miklos Vajna @ 2008-05-13 9:16 UTC (permalink / raw)
To: Junio C Hamano, git, nanako3
[-- Attachment #1: Type: text/plain, Size: 212 bytes --]
On Tue, May 13, 2008 at 11:11:26AM +0200, Miklos Vajna <vmiklos@frugalware.org> wrote:
> Ouch, somehow I read infdef: as ifdef: so I intenionally did not add
^^^^^^ ifndef, to be correct.
[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2008-05-13 9:17 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-26 21:01 [PATCH 1/2] Documentation: move options of git-diff-tree to a separate file Miklos Vajna
2008-04-26 21:01 ` [PATCH 2/2] Documentation: include diff-tree-options in git-show manpage Miklos Vajna
2008-04-27 0:24 ` [PATCH 1/2] Documentation: move options of git-diff-tree to a separate file Junio C Hamano
2008-04-27 2:17 ` [PATCH] " Miklos Vajna
2008-04-27 7:29 ` しらいしななこ
[not found] ` <200804270730.m3R7UTTp011092@mi1.bluebottle.com>
2008-04-27 11:45 ` [PATCH] git show documentation: no longer refer to git-diff-tree options Miklos Vajna
2008-04-27 17:33 ` Junio C Hamano
2008-05-11 22:37 ` Miklos Vajna
2008-05-12 23:10 ` Junio C Hamano
2008-05-13 9:11 ` Miklos Vajna
2008-05-13 9:16 ` Miklos Vajna
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).