Skip to content

Commit 02646fe

Browse files
jrngitster
authored andcommitted
Documentation/shortlog: scripted users should not rely on implicit HEAD
When passed no revision arguments, ‘git shortlog’ reads a log from stdin if and only if stdin is not a tty. So scripts that need to function identically when standard input is a terminal (as when run interactively) and not (as when run through a cron job) should either supply a log themselves or specify the desired revisions explicitly. Signed-off-by: Jonathan Nieder <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent e92e9cd commit 02646fe

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Documentation/git-shortlog.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ SYNOPSIS
99
--------
1010
[verse]
1111
git log --pretty=short | 'git shortlog' [-h] [-n] [-s] [-e] [-w]
12-
'git shortlog' [-n|--numbered] [-s|--summary] [-e|--email] [-w[<width>[,<indent1>[,<indent2>]]]] [<committish>...]
12+
'git shortlog' [-n|--numbered] [-s|--summary] [-e|--email] [-w[<width>[,<indent1>[,<indent2>]]]] <commit>...
1313

1414
DESCRIPTION
1515
-----------
@@ -19,6 +19,11 @@ the first line of the commit message will be shown.
1919

2020
Additionally, "[PATCH]" will be stripped from the commit description.
2121

22+
If no revisions are passed on the command line and either standard input
23+
is not a terminal or there is no current branch, 'git shortlog' will
24+
output a summary of the log read from standard input, without
25+
reference to the current repository.
26+
2227
OPTIONS
2328
-------
2429

0 commit comments

Comments
 (0)