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 <nanako3@lavabit.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Nanako Shiraishi committed
Feb 24, 2009 at 18:59 UTC
3a4c1a5e212357c3df030b6713c75466694c2e77
2 files changed
+2
-1
Documentation/pretty-options.txt
+1
@@ -1,4 +1,5 @@
1
--pretty[='<format>']::
2
+--format[='<format>']::
3
4
Pretty-print the contents of the commit logs in a given format,
5
where '<format>' can be one of 'oneline', 'short', 'medium',
revision.c
+1
-1
@@ -1144,7 +1144,7 @@ static int handle_revision_opt(struct rev_info *revs, int argc, const char **arg
1144
} else if (!strcmp(arg, "--pretty")) {
1145
revs->verbose_header = 1;
1146
get_commit_format(arg+8, revs);
1147
- } else if (!prefixcmp(arg, "--pretty=")) {
1147
+ } else if (!prefixcmp(arg, "--pretty=") || !prefixcmp(arg, "--format=")) {
1148
revs->verbose_header = 1;
1149
get_commit_format(arg+9, revs);
1150
} else if (!strcmp(arg, "--graph")) {