summaryrefslogtreecommitdiff
path: root/revision.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2014-09-02 13:25:03 -0700
committerJunio C Hamano <gitster@pobox.com>2014-09-02 13:25:04 -0700
commit44ceb79f84b0f339147d2d44e4bb50cc472be03e (patch)
tree207c1f0e269f9d99602ae9043ad6a259428a9831 /revision.c
parent56f214e0716dec043b50a7e1e8cc181be2ef7df2 (diff)
parentb9c7d6e4330e3dcdb3b3e5f013e5667e47555c95 (diff)
downloadgit-44ceb79f84b0f339147d2d44e4bb50cc472be03e.tar.gz
Merge branch 'jk/pretty-empty-format'
"git log --pretty/format=" with an empty format string did not mean the more obvious "No output whatsoever" but "Use default format", which was counterintuitive. * jk/pretty-empty-format: pretty: make empty userformats truly empty pretty: treat "--format=" as an empty userformat revision: drop useless string offset when parsing "--pretty"
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 2571ada6bf..615535c984 100644
--- a/revision.c
+++ b/revision.c
@@ -1825,7 +1825,7 @@ static int handle_revision_opt(struct rev_info *revs, int argc, const char **arg
} else if (!strcmp(arg, "--pretty")) {
revs->verbose_header = 1;
revs->pretty_given = 1;
- get_commit_format(arg+8, revs);
+ get_commit_format(NULL, revs);
} else if (starts_with(arg, "--pretty=") || starts_with(arg, "--format=")) {
/*
* Detached form ("--pretty X" as opposed to "--pretty=X")