From: Nanako Shiraishi Date: Tue, 24 Feb 2009 09:59:14 +0000 (+0900) Subject: Add --format that is a synonym to --pretty X-Git-Tag: v1.6.3-rc0~203^2~4 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=3a4c1a5e212357c3df030b6713c75466694c2e77;p=git.git Add --format that is a synonym to --pretty Some people prefer to call the pretty-print styles "format", and get annoyed to see "git log --format=short" fail. Introduce it as a synonym to --pretty so that both can be used. Signed-off-by: Nanako Shiraishi Signed-off-by: Junio C Hamano --- diff --git a/Documentation/pretty-options.txt b/Documentation/pretty-options.txt index 5f21efe40..65960192e 100644 --- a/Documentation/pretty-options.txt +++ b/Documentation/pretty-options.txt @@ -1,4 +1,5 @@ --pretty[='']:: +--format[='']:: Pretty-print the contents of the commit logs in a given format, where '' can be one of 'oneline', 'short', 'medium', diff --git a/revision.c b/revision.c index 286e416b7..556c3195b 100644 --- a/revision.c +++ b/revision.c @@ -1144,7 +1144,7 @@ static int handle_revision_opt(struct rev_info *revs, int argc, const char **arg } else if (!strcmp(arg, "--pretty")) { revs->verbose_header = 1; get_commit_format(arg+8, revs); - } else if (!prefixcmp(arg, "--pretty=")) { + } else if (!prefixcmp(arg, "--pretty=") || !prefixcmp(arg, "--format=")) { revs->verbose_header = 1; get_commit_format(arg+9, revs); } else if (!strcmp(arg, "--graph")) {