Include rev-list options in git-log manpage.
PATCH 1/1 Include rev-list options in git-log manpage.
It seems that all the git-rev-list options (--grep, --author, etc) were missing from the git-log manpage. This can be quite problematic if one does not know that git-log accepts the options of git-rev-list.
So move these options to a separate file and include it from both git-rev-list.txt and git-log.txt.
---
Noticed by tsuna on IRC. I hope this is okay for 1.5.4.
Documentation/git-log.txt | 2 + Documentation/git-rev-list.txt | 358 +----------------------------------- Documentation/rev-list-options.txt | 356 +++++++++++++++++++++++++++++++++++ 3 files changed, 359 insertions(+), 357 deletions(-) create mode 100644 Documentation/rev-list-options.txt
Documentation/git-log.txt +2 -0
@@ -80,6 +80,8 @@ include::diff-options.txt[] Show only commits that affect the specified paths. +include::rev-list-options.txt[] + include::pretty-formats.txt[] include::diff-generate-patch.txt[]
Documentation/git-rev-list.txt +1 -357
364 lines not on this page · raw message
Documentation/rev-list-options.txt new file +356 -0
356 lines not on this page · raw message
Signature · 1 line
1.5.4.rc3.4.g16335-dirty
Quoted 11 lines · Miklos Vajna
It seems that all the git-rev-list options (--grep, --author, etc) were missing from the git-log manpage. This can be quite problematic if one does not know that git-log accepts the options of git-rev-list.
So move these options to a separate file and include it from both git-rev-list.txt and git-log.txt.
Signed-off-by Miklos Vajna <[email protected]>---
Noticed by tsuna on IRC. I hope this is okay for 1.5.4.
Have you generated documentation with and without patch and run diff between them?
There is an obvious duplicated inclusion of pretty-options.txt[] in git-log.{1,html}.
In addition, this part
Documentation/git-rev-list.txt linkgit:git-repack[1]. · line 96
Quoted 6 lines
Documentation/git-rev-list.txt +0
-6-Commit Formatting -~~~~~~~~~~~~~~~~~ - -Using these options, linkgit:git-rev-list[1] will act similar to the -more specialized family of commit log tools: linkgit:git-log[1], -linkgit:git-show[1], and linkgit:git-whatchanged[1]
is _clearly_ written for git-rev-list and unsuitable for any of the commands listed above.
git-log manual page has been saying that "This manual page describes only the most frequently used options." I would agree that it is a laudable goal to replace that sentence with an included common source text, but there needs to be a bit more careful copyediting than your a patch.
PATCH 1/1 Include rev-list options in git-log manpage.
Replace the "This manual page describes only the most frequently used options." text with the list of rev-list options in git-log manpage. (The git-diff-tree options are already included.)
Move these options to a separate file and include it from both git-rev-list.txt and git-log.txt.
---
Quoted 2 lines · Junio C Hamano
Have you generated documentation with and without patch and run diff between them?
Yes and no. I generated the documentation, but I forgot to diff the result with the old one. :-/
Quoted 2 lines
There is an obvious duplicated inclusion of pretty-options.txt[] in git-log.{1,html}.
I missed that one. Now should be fixed. Also there were other duplicated options like --first-parent and -g.
Quoted 11 lines
In addition, this part
Review
Quoted 6 lines
(quoted diff) +0
-6-Commit Formatting -~~~~~~~~~~~~~~~~~ - -Using these options, linkgit:git-rev-list[1] will act similar to the -more specialized family of commit log tools: linkgit:git-log[1], -linkgit:git-show[1], and linkgit:git-whatchanged[1]is _clearly_ written for git-rev-list and unsuitable for any of the commands listed above.
Fixed. Also the other occurences, like --objects, where the text was specific to rev-list as well.
Quoted 5 lines
git-log manual page has been saying that "This manual page describes only the most frequently used options." I would agree that it is a laudable goal to replace that sentence with an included common source text, but there needs to be a bit more careful copyediting than your a patch.
As the git-diff-tree options were already included, and this patch adds the git-rev-list options, I removed this text.
Documentation/git-log.txt | 6 +- Documentation/git-rev-list.txt | 358 +----------------------------------- Documentation/rev-list-options.txt | 364 ++++++++++++++++++++++++++++++++++++ 3 files changed, 367 insertions(+), 361 deletions(-) create mode 100644 Documentation/rev-list-options.txt
Documentation/git-log.txt +2 -4
@@ -19,14 +19,10 @@ command to control what is shown and how, and options applicable to the linkgit:git-diff-tree[1] commands to control how the changes each commit introduces are shown. -This manual page describes only the most frequently used options. - OPTIONS ------- -include::pretty-options.txt[] - :git-log: 1 include::diff-options.txt[]
@@ -80,6 +76,8 @@ include::diff-options.txt[] Show only commits that affect the specified paths. +include::rev-list-options.txt[] + include::pretty-formats.txt[] include::diff-generate-patch.txt[]
Documentation/git-rev-list.txt +1 -357
364 lines not on this page · raw message
Documentation/rev-list-options.txt new file +364 -0
364 lines not on this page · raw message
Signature · 1 line
1.5.4.rc3.4.g16335-dirty
Quoted 5 lines · Miklos Vajna
Documentation/git-log.txt | 6 +- Documentation/git-rev-list.txt | 358 +----------------------------------- Documentation/rev-list-options.txt | 364 ++++++++++++++++++++++++++++++++++++ 3 files changed, 367 insertions(+), 361 deletions(-) create mode 100644 Documentation/rev-list-options.txt
Had you used format-patch -C then the patch would have been shorter by ~240 lines. And it would have been immediately obvious that you have put this inside ifndef::gitlog[] brackets:
Documentation/rev-list-options.txt line 181
Quoted 10 lines
Documentation/rev-list-options.txt new file +10
-0+ifndef::git-log[] +--first-parent:: + Follow only the first parent commit upon seeing a merge + commit. This option can give a better overview when + viewing the evolution of a particular topic branch, + because merges into a topic branch tend to be only about + adjusting to updated upstream from time to time, and + this option allows you to ignore the individual commits + brought in to your history by such a merge. +endif::git-log[]
I wonder why these brackets are necessary. This text applies to git-log, too, no? Can't you just remove that paragraph from git-log.txt?
-- Hannes
PATCH 1/1 Include rev-list options in git-log manpage.
Replace the "This manual page describes only the most frequently used options." text with the list of rev-list options in git-log manpage. (The git-diff-tree options are already included.)
Move these options to a separate file and include it from both git-rev-list.txt and git-log.txt.
---
Quoted 4 lines · Johannes Sixt
Had you used format-patch -C then the patch would have been shorter by ~240 lines. And it would have been immediately obvious that you have put this inside ifndef::gitlog[] brackets:
Quoted 13 lines
Review
Quoted 10 lines
(quoted diff) +10
-0+ifndef::git-log[] +--first-parent:: + Follow only the first parent commit upon seeing a merge + commit. This option can give a better overview when + viewing the evolution of a particular topic branch, + because merges into a topic branch tend to be only about + adjusting to updated upstream from time to time, and + this option allows you to ignore the individual commits + brought in to your history by such a merge. +endif::git-log[]I wonder why these brackets are necessary. This text applies to git-log, too, no? Can't you just remove that paragraph from git-log.txt?
Okay, now using -C :)
Also I removed the duplicated options from git-log.txt (--first-parent and -g) to avoid duplicated descriptions.
Documentation/git-log.txt | 21 +-
Documentation/git-rev-list.txt | 358 +-------------------
.../{git-rev-list.txt => rev-list-options.txt} | 118 +------
3 files changed, 11 insertions(+), 486 deletions(-)
copy Documentation/{git-rev-list.txt => rev-list-options.txt} (76%)Documentation/git-log.txt +2 -19
@@ -19,14 +19,10 @@ command to control what is shown and how, and options applicable to the linkgit:git-diff-tree[1] commands to control how the changes each commit introduces are shown. -This manual page describes only the most frequently used options. - OPTIONS ------- -include::pretty-options.txt[] - :git-log: 1 include::diff-options.txt[]
@@ -41,21 +37,6 @@ include::diff-options.txt[] and <until>, see "SPECIFYING REVISIONS" section in linkgit:git-rev-parse[1]. ---first-parent:: - Follow only the first parent commit upon seeing a merge - commit. This option can give a better overview when - viewing the evolution of a particular topic branch, - because merges into a topic branch tend to be only about - adjusting to updated upstream from time to time, and - this option allows you to ignore the individual commits - brought in to your history by such a merge. - --g, \--walk-reflogs:: - Show commits as they were recorded in the reflog. The log contains - a record about how the tip of a reference was changed. - Cannot be combined with --reverse. - See also linkgit:git-reflog[1]. - --decorate:: Print out the ref names of any commits that are shown.
@@ -80,6 +61,8 @@ include::diff-options.txt[] Show only commits that affect the specified paths. +include::rev-list-options.txt[] + include::pretty-formats.txt[] include::diff-generate-patch.txt[]
Documentation/git-rev-list.txt +1 -357
364 lines not on this page · raw message
Documentation/rev-list-options.txt renamed from Documentation/git-rev-list.txt +8 -110
160 lines not on this page · raw message
Signature · 1 line
1.5.4.rc3.4.g16335-dirty
Quoted 11 lines · Miklos Vajna
Documentation/rev-list-options.txt renamed from Documentation/git-rev-list.txt +3
-0+ifndef::git-log[] Using these options, linkgit:git-rev-list[1] will act similar to the more specialized family of commit log tools: linkgit:git-log[1], linkgit:git-show[1], and linkgit:git-whatchanged[1] +endif::git-log[] +ifndef::git-log[] --bisect:: Limit output to the one commit object which is roughly halfway between
Documentation/rev-list-options.txt may not compile for example). · line 305
Quoted 4 lines
Documentation/rev-list-options.txt renamed from Documentation/git-rev-list.txt +1
-0@@ -388,6 +302,7 @@ may not compile for example). This option can be used along with `--bisect-vars`, in this case, after all the sorted commit objects, there will be the same text as if `--bisect-vars` had been used alone. +endif::git-log[]
I do not like these. What you are really trying to express is "this section makes sense only in rev-list documentation", not "among the current set of documentation, the one this section does not make sense in is git-log". We might end up including this in some other documents.
IOW, they should rather be "ifdef::git-rev-list[]" instead, (of course you have to define that token yourself if there isn't one already).
PATCH 1/1 Include rev-list options in git-log manpage.
Replace the "This manual page describes only the most frequently used options." text with the list of rev-list options in git-log manpage. (The git-diff-tree options are already included.)
Move these options to a separate file and include it from both git-rev-list.txt and git-log.txt.
---
Quoted 9 lines · Junio C Hamano
I do not like these. What you are really trying to express is "this section makes sense only in rev-list documentation", not "among the current set of documentation, the one this section does not make sense in is git-log". We might end up including this in some other documents.
IOW, they should rather be "ifdef::git-rev-list[]" instead, (of course you have to define that token yourself if there isn't one already).
Fixed.
Documentation/git-log.txt | 21 +-
Documentation/git-rev-list.txt | 359 +-------------------
.../{git-rev-list.txt => rev-list-options.txt} | 118 +------
3 files changed, 12 insertions(+), 486 deletions(-)
copy Documentation/{git-rev-list.txt => rev-list-options.txt} (76%)Documentation/git-log.txt +2 -19
@@ -19,14 +19,10 @@ command to control what is shown and how, and options applicable to the linkgit:git-diff-tree[1] commands to control how the changes each commit introduces are shown. -This manual page describes only the most frequently used options. - OPTIONS ------- -include::pretty-options.txt[] - :git-log: 1 include::diff-options.txt[]
@@ -41,21 +37,6 @@ include::diff-options.txt[] and <until>, see "SPECIFYING REVISIONS" section in linkgit:git-rev-parse[1]. ---first-parent:: - Follow only the first parent commit upon seeing a merge - commit. This option can give a better overview when - viewing the evolution of a particular topic branch, - because merges into a topic branch tend to be only about - adjusting to updated upstream from time to time, and - this option allows you to ignore the individual commits - brought in to your history by such a merge. - --g, \--walk-reflogs:: - Show commits as they were recorded in the reflog. The log contains - a record about how the tip of a reference was changed. - Cannot be combined with --reverse. - See also linkgit:git-reflog[1]. - --decorate:: Print out the ref names of any commits that are shown.
@@ -80,6 +61,8 @@ include::diff-options.txt[] Show only commits that affect the specified paths. +include::rev-list-options.txt[] + include::pretty-formats.txt[] include::diff-generate-patch.txt[]
Documentation/git-rev-list.txt +2 -357
365 lines not on this page · raw message
Documentation/rev-list-options.txt renamed from Documentation/git-rev-list.txt +8 -110
160 lines not on this page · raw message
Signature · 1 line
1.5.4.rc3.4.g16335-dirty
PATCH 1/1 Include rev-list options in git-log manpage.
Replace the "This manual page describes only the most frequently used options." text with the list of rev-list options in git-log manpage. (The git-diff-tree options are already included.)
Move these options to a separate file and include it from both git-rev-list.txt and git-log.txt.
---
Quoted 5 lines · Miklos Vajna
Quoted 3 lines
IOW, they should rather be "ifdef::git-rev-list[]" instead, (of course you have to define that token yourself if there isn't one already).
Fixed.
My bad, the previous version introduced two typos (ref-list instead of rev-list). This one should be OK.
Documentation/git-log.txt | 21 +-
Documentation/git-rev-list.txt | 359 +-------------------
.../{git-rev-list.txt => rev-list-options.txt} | 118 +------
3 files changed, 12 insertions(+), 486 deletions(-)
copy Documentation/{git-rev-list.txt => rev-list-options.txt} (76%)Documentation/git-log.txt +2 -19
@@ -19,14 +19,10 @@ command to control what is shown and how, and options applicable to the linkgit:git-diff-tree[1] commands to control how the changes each commit introduces are shown. -This manual page describes only the most frequently used options. - OPTIONS ------- -include::pretty-options.txt[] - :git-log: 1 include::diff-options.txt[]
@@ -41,21 +37,6 @@ include::diff-options.txt[] and <until>, see "SPECIFYING REVISIONS" section in linkgit:git-rev-parse[1]. ---first-parent:: - Follow only the first parent commit upon seeing a merge - commit. This option can give a better overview when - viewing the evolution of a particular topic branch, - because merges into a topic branch tend to be only about - adjusting to updated upstream from time to time, and - this option allows you to ignore the individual commits - brought in to your history by such a merge. - --g, \--walk-reflogs:: - Show commits as they were recorded in the reflog. The log contains - a record about how the tip of a reference was changed. - Cannot be combined with --reverse. - See also linkgit:git-reflog[1]. - --decorate:: Print out the ref names of any commits that are shown.
@@ -80,6 +61,8 @@ include::diff-options.txt[] Show only commits that affect the specified paths. +include::rev-list-options.txt[] + include::pretty-formats.txt[] include::diff-generate-patch.txt[]
Documentation/git-rev-list.txt +2 -357
365 lines not on this page · raw message
Documentation/rev-list-options.txt renamed from Documentation/git-rev-list.txt +8 -110
160 lines not on this page · raw message
Signature · 1 line
1.5.4.rc3.4.g16335-dirty
Quoted 4 lines · Miklos Vajna
Quoted 1 line
Fixed.
My bad, the previous version introduced two typos (ref-list instead of rev-list). This one should be OK.
Now, this moves option descriptions of git-log around for no good reason, other than that it was more convenient in the source.
Which is not a very good excuse in general, but I do not think the original ordering was carefully designed to be optimal for the readers either, so let's take it.
Thanks.
Quoted 11 lines · Miklos Vajna
Documentation/rev-list-options.txt renamed from Documentation/git-rev-list.txt +3
-0+ifndef::git-log[] Using these options, linkgit:git-rev-list[1] will act similar to the more specialized family of commit log tools: linkgit:git-log[1], linkgit:git-show[1], and linkgit:git-whatchanged[1] +endif::git-log[] +ifndef::git-log[] --bisect:: Limit output to the one commit object which is roughly halfway between
Documentation/rev-list-options.txt may not compile for example). · line 305
Quoted 4 lines
Documentation/rev-list-options.txt renamed from Documentation/git-rev-list.txt +1
-0@@ -388,6 +302,7 @@ may not compile for example). This option can be used along with `--bisect-vars`, in this case, after all the sorted commit objects, there will be the same text as if `--bisect-vars` had been used alone. +endif::git-log[]
I do not like these. What you are really trying to express is "this section makes sense only in rev-list documentation", not "the current set of documentation this section does not make sese is git-log". We might end up including this in some other documents.
IOW, they should rather be "ifdef::git-rev-list[]" instead.