diff options
author | Junio C Hamano <gitster@pobox.com> | 2012-05-11 11:13:26 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-05-11 11:13:26 -0700 |
commit | 0582afbcb33a7ca32d09620b8dcaee63c5dd6000 (patch) | |
tree | 87fa785a581377342a50450cbae925fb771f5664 /builtin | |
parent | e6a1c43aafa8b221e05e57132549dcb3cd7866cf (diff) | |
parent | 658219f1c75e25adbe530a3b681ba3d2332caca6 (diff) | |
download | git-0582afbcb33a7ca32d09620b8dcaee63c5dd6000.tar.gz |
Merge branch 'rl/show-empty-prefix' into maint
Unlike "git rev-parse --show-cdup", "--show-prefix" did not give an
empty line when run at the top of the working tree.
By Ross Lagerwall
* rl/show-empty-prefix:
rev-parse --show-prefix: add in trailing newline
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/rev-parse.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/builtin/rev-parse.c b/builtin/rev-parse.c index 98d1cbecca..733f626f6c 100644 --- a/builtin/rev-parse.c +++ b/builtin/rev-parse.c @@ -634,6 +634,8 @@ int cmd_rev_parse(int argc, const char **argv, const char *prefix) if (!strcmp(arg, "--show-prefix")) { if (prefix) puts(prefix); + else + putchar('\n'); continue; } if (!strcmp(arg, "--show-cdup")) { |