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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2012/04/09 21:07, Junio C Hamano wrote:
fc68875 (t1501 (rev-parse): clarify, 2010-07-24) says it is a "possible
bug", but I do not think the expectation of the new test added by that
commit is entirely correct.

Because the assignment will strip the trailing LF away adding an extra
newline at the end would not matter in practice in many scripts, e.g.


True, and the current behavior does exactly what the man page says:
"When the command is invoked from a subdirectory, show the path of the current directory relative to the top-level directory."

So then perhaps the test should be removed?

Also, --show-cdup has a similar description for the man page but does output a newline when invoked from the root dir. Should this behavior be made consistent?

--
Ross Lagerwall
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]