summaryrefslogtreecommitdiff
path: root/revision.c
diff options
context:
space:
mode:
authorNanako Shiraishi <nanako3@lavabit.com>2009-02-24 18:59:14 +0900
committerJunio C Hamano <gitster@pobox.com>2009-02-24 23:53:36 -0800
commit3a4c1a5e212357c3df030b6713c75466694c2e77 (patch)
tree5a9ca66c17931258f0a8bdb2e94a0032b8620cee /revision.c
parentd43c07b8ee6684a0df8636a0c849605f0ffc066f (diff)
downloadgit-3a4c1a5e212357c3df030b6713c75466694c2e77.tar.gz
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>
Diffstat (limited to 'revision.c')
-rw-r--r--revision.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/revision.c b/revision.c
index 286e416b75..556c3195b4 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")) {