rev-parse --show-prefix: add in trailing newline
authorRoss Lagerwall <rosslagerwall@gmail.com>
Mon, 9 Apr 2012 13:27:56 +0000 (15:27 +0200)
committerJunio C Hamano <gitster@pobox.com>
Tue, 10 Apr 2012 16:25:35 +0000 (09:25 -0700)
commit658219f1c75e25adbe530a3b681ba3d2332caca6
tree54dd4f9e3f1cc633dceffccd6bcb96e35fe5f09d
parente8dde3e5f9ddb7cf95a6ff3cea6cf07c3a2db80d
rev-parse --show-prefix: add in trailing newline

Print out a trailing newline when --show-prefix is run with cwd
at the top level of the tree which results in an empty prefix.
Behavior is now like --show-cdup.

Fixes an expected failure in t1501.

Signed-off-by: Ross Lagerwall <rosslagerwall@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/rev-parse.c
t/t1501-worktree.sh