[PATCH] rev-list: accept --format without argument
From: Matthieu Moy <hidden>
Date: 2016-06-15 22:49:12
Subsystem:
the rest · Maintainer:
Linus Torvalds
From: Matthieu Moy <hidden>
Date: 2016-06-15 22:49:12
Subsystem:
the rest · Maintainer:
Linus Torvalds
The documentation says the syntax is --format[='<format>'], match it in the implementation. Signed-off-by: Matthieu Moy <redacted> --- Not that it's terribly usefull, but better be consistant ... revision.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/revision.c b/revision.c
index 33fa0b5..4b64757 100644
--- a/revision.c
+++ b/revision.c@@ -1300,10 +1300,10 @@ static int handle_revision_opt(struct rev_info *revs, int argc, const char **arg revs->combine_merges = 1; } else if (!strcmp(arg, "-v")) { revs->verbose_header = 1; - } else if (!strcmp(arg, "--pretty")) { + } else if (!strcmp(arg, "--pretty") || !strcmp(arg, "--format")) { revs->verbose_header = 1; revs->pretty_given = 1; - get_commit_format(arg+8, revs); + get_commit_format("", revs); } else if (!prefixcmp(arg, "--pretty=") || !prefixcmp(arg, "--format=")) { /* * Detached form ("--pretty X" as opposed to "--pretty=X")
--
1.7.2.25.g9ebe3