Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [PATCH] rev-parse --show-prefix: add in trailing newline

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:53:32

Jonathan Nieder [off-list ref] writes:
(cc-ing Duy)
Hi,

Ross Lagerwall wrote:
quoted
--- 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;
This makes the output more consistent but it is a little puzzling how
it does that.  Why is prefix NULL instead of "" when we are at the
toplevel of the worktree?
Interesting point ;-)
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help