diff options
author | Nanako Shiraishi <nanako3@lavabit.com> | 2009-02-24 18:59:16 +0900 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-02-24 23:53:40 -0800 |
commit | de84accc59baef73f7827d59f0d479521ecad937 (patch) | |
tree | db6f3a500d73a939106a4ec40471ff83e1995dfc /revision.c | |
parent | Give short-hands to --pretty=tformat:%formatstring (diff) | |
download | tgif-de84accc59baef73f7827d59f0d479521ecad937.tar.xz |
Add --oneline that is a synonym to "--pretty=oneline --abbrev-commit"
These two are often used together but are too long to type.
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.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/revision.c b/revision.c index 556c3195b4..c4efe5b22e 100644 --- a/revision.c +++ b/revision.c @@ -1147,6 +1147,10 @@ static int handle_revision_opt(struct rev_info *revs, int argc, const char **arg } else if (!prefixcmp(arg, "--pretty=") || !prefixcmp(arg, "--format=")) { revs->verbose_header = 1; get_commit_format(arg+9, revs); + } else if (!strcmp(arg, "--oneline")) { + revs->verbose_header = 1; + get_commit_format("oneline", revs); + revs->abbrev_commit = 1; } else if (!strcmp(arg, "--graph")) { revs->topo_order = 1; revs->rewrite_parents = 1; |