shortlog wrap usage
PATCH 1/1 shortlog wrap usage
Hi all,
Found this hidden "-w" option to the shortlog command, and thought it might be good to have it documented.
builtin-shortlog.c | 2 +- man1/git-shortlog.1 | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-)
Thanks,
Fredrik
man1/git-shortlog.1 +5 -1
@@ -13,7 +13,8 @@ git\-shortlog \- Summarize 'git log' output .sp .nf git\-log \-\-pretty=short | \fIgit\-shortlog\fR [\-h] [\-n] [\-s] [\-e] -git\-shortlog [\-n|\-\-numbered] [\-s|\-\-summary] [\-e|\-\-email] [<committish>\&...] +git\-shortlog [\-n|\-\-numbered] [\-s|\-\-summary] [\-e|\-\-email] [\-w] + [<committish>\&...] .fi .SH "DESCRIPTION" Summarizes \fIgit log\fR output in a format suitable for inclusion in release announcements. Each commit will be grouped by author and the first line of the commit message will be shown.
@@ -32,6 +33,9 @@ Suppress commit description and provide a commit count summary only. .TP \-e, \-\-email Show the email address of each author. +.TP +\-w[<width>[,<indent1>[,<indent2>]]] +Wrap printed output. .SH "FILES" If the file .mailmap exists, it will be used for mapping author email addresses to a real author name. One mapping per line, first the author name followed by the email address enclosed by \fI<\fR and \fI>\fR. Use hash \fI#\fR for comments. Example: .sp
builtin-shortlog.c +1 -1
@@ -9,7 +9,7 @@#include "shortlog.h" static const char shortlog_usage[] = -"git-shortlog [-n] [-s] [-e] [<commit-id>... ]" ; +"git-shortlog [-n] [-s] [-e] [-w] [<commit-id>... ]" ;static int compare_by_number (const void *a1,const void *a2) {
PATCH 1/1 Document -w option to shortlog
Noticed by Fredrik Noring.
Signed-off-by Junio C Hamano <[email protected]>
--- Documentation/git-shortlog.txt | 10 ++++++++-- builtin-shortlog.c | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-)
Documentation/git-shortlog.txt +8 -2
@@ -8,8 +8,8 @@ git-shortlog - Summarize 'git log' output SYNOPSIS -------- [verse] -git-log --pretty=short | 'git-shortlog' [-h] [-n] [-s] [-e] -git-shortlog [-n|--numbered] [-s|--summary] [-e|--email] [<committish>...] +git-log --pretty=short | 'git-shortlog' [-h] [-n] [-s] [-e] [-w] +git-shortlog [-n|--numbered] [-s|--summary] [-e|--email] [-w[<width>[,<indent1>[,<indent2>]]]] [<committish>...] DESCRIPTION -----------
@@ -35,6 +35,12 @@ OPTIONS -e, \--email:: Show the email address of each author. +-w[<width>[,<indent1>[,<indent2>]]]:: + Linewrap the output by wrapping each line at `width`. The first + line of each entry is indented by `indent1` spaces, and the second + and subsequent lines are indented by `indent2` spaces. `width`, + `indent1`, and `indent2` default to 76, 6 and 9 respectively. + FILES -----
builtin-shortlog.c +1 -1
@@ -8,7 +8,7 @@#include "mailmap.h" static const char shortlog_usage[] = -"git-shortlog [-n] [-s] [-e] [<commit-id>... ]" ; +"git-shortlog [-n] [-s] [-e] [-w] [<commit-id>... ]" ;static char *common_repo_prefix;static int email;