Skip to content

Commit 461caf3

Browse files
prati0100gitster
authored andcommitted
git-shortlog.txt: include commit limiting options
git-shortlog, like git-log, supports options to filter what commits are used to generate the log. These options come from git-rev-list, and are documented in Documentation/rev-list-options.txt. Include those options in shortlog's documentation. But since rev-list-options.txt contains some other options that don't really apply in the context of shortlog (like diff formatting, commit ordering, etc), add a switch in rev-list-options.txt that excludes those sections from the shortlog documentation. To be more specific, include only the "Commit Limiting" and "History Simplification" sections. Signed-off-by: Pratyush Yadav <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 5fa0f52 commit 461caf3

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

Documentation/git-shortlog.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,9 @@ them.
7676
Paths may need to be prefixed with `--` to separate them from
7777
options or the revision range, when confusion arises.
7878

79+
:git-shortlog: 1
80+
include::rev-list-options.txt[]
81+
7982
MAPPING AUTHORS
8083
---------------
8184

Documentation/rev-list-options.txt

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -579,6 +579,7 @@ above) if (1) they are referenced by tags, or (2) they change the
579579
contents of the paths given on the command line. All other
580580
commits are marked as TREESAME (subject to be simplified away).
581581

582+
ifndef::git-shortlog[]
582583
ifdef::git-rev-list[]
583584
Bisection Helpers
584585
~~~~~~~~~~~~~~~~~
@@ -634,8 +635,9 @@ This option can be used along with `--bisect-vars`, in this case,
634635
after all the sorted commit objects, there will be the same text as if
635636
`--bisect-vars` had been used alone.
636637
endif::git-rev-list[]
638+
endif::git-shortlog[]
637639

638-
640+
ifndef::git-shortlog[]
639641
Commit Ordering
640642
~~~~~~~~~~~~~~~
641643

@@ -677,7 +679,9 @@ together.
677679
Output the commits chosen to be shown (see Commit Limiting
678680
section above) in reverse order. Cannot be combined with
679681
`--walk-reflogs`.
682+
endif::git-shortlog[]
680683

684+
ifndef::git-shortlog[]
681685
Object Traversal
682686
~~~~~~~~~~~~~~~~
683687

@@ -801,7 +805,9 @@ endif::git-rev-list[]
801805

802806
--do-walk::
803807
Overrides a previous `--no-walk`.
808+
endif::git-shortlog[]
804809

810+
ifndef::git-shortlog[]
805811
Commit Formatting
806812
~~~~~~~~~~~~~~~~~
807813

@@ -957,7 +963,9 @@ ifdef::git-rev-list[]
957963
counts and print the count for equivalent commits separated
958964
by a tab.
959965
endif::git-rev-list[]
966+
endif::git-shortlog[]
960967

968+
ifndef::git-shortlog[]
961969
ifndef::git-rev-list[]
962970
Diff Formatting
963971
~~~~~~~~~~~~~~~
@@ -1000,3 +1008,4 @@ options may be given. See linkgit:git-diff-files[1] for more options.
10001008
-t::
10011009
Show the tree objects in the diff output. This implies `-r`.
10021010
endif::git-rev-list[]
1011+
endif::git-shortlog[]

0 commit comments

Comments
 (0)