bug: git format prints no final newline

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

 



This command omits the final newline:

git log --format=format:"%H"

check with: `| tail | cat -A`

This command doesn't, but there is an extra newline between each line of course:

git log --format=format:"%H%n"

This seems to be intentional in the code, a newline is printed before
each line except the first:

https://github.com/git/git/blob/master/log-tree.c#L664

It seems more correct to print a newline after every line, but the
code is very hairy so I am keen to get any feedback before attempting
that.

Thanks



[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]

  Powered by Linux