summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 3640754)
raw | patch | inline | side by side (parent: 3640754)
author | Nanako Shiraishi <nanako3@lavabit.com> | |
Tue, 24 Feb 2009 09:59:16 +0000 (18:59 +0900) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 25 Feb 2009 07:53:40 +0000 (23:53 -0800) |
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>
Signed-off-by: Nanako Shiraishi <nanako3@lavabit.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/pretty-options.txt | patch | blob | history | |
revision.c | patch | blob | history |
index 65960192e8d32dc45e000d0c343350d0cf5e578f..bff94991b68aaca5a81eae4e6681f3431aa6b9ac 100644 (file)
This should make "--pretty=oneline" a whole lot more readable for
people using 80-column terminals.
+--oneline::
+ This is a shorthand for "--pretty=oneline --abbrev-commit"
+ used together.
+
--encoding[=<encoding>]::
The commit objects record the encoding used for the log message
in their encoding header; this option can be used to tell the
diff --git a/revision.c b/revision.c
index 556c3195b4eed3e17df496a5d34537aa98e315c3..c4efe5b22e6f6f7741ed935b015bf6e0ace05d7e 100644 (file)
--- 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;