All of lore.kernel.org
 help / color / mirror / Atom feed
* git-log --format missing trailing newline character
@ 2024-12-23 20:28 Alejandro Colomar
  2024-12-23 20:36 ` Kristoffer Haugsbakk
  0 siblings, 1 reply; 7+ messages in thread
From: Alejandro Colomar @ 2024-12-23 20:28 UTC (permalink / raw)
  To: git

[-- Attachment #1: Type: text/plain, Size: 644 bytes --]

Hi!

I'm having trouble scripting around git-log(1), due to a missing newline
character at the end of the file.

	$ git -v
	git version 2.45.2
	$ git log --format=format:'%H' HEAD^^^..HEAD | wc -l
	2
	$ git log --format=format:'%H' HEAD^^^..HEAD
	2ff431ab1b46a25088fe40baf1faf35ea9fac722
	e75e6c4504022ae52d877926e63c908d9572088a
	178442837d39560a789a8044a8eb90fde3ad7cd7

Would you mind fixing this bug?  POSIX requires that text files end in a
newline character, precisely for being able to use UNIX tools to process
output from arbitrary commands.


Have a lovely night!
Alex

-- 
<https://www.alejandro-colomar.es/>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-12-26 17:06 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-23 20:28 git-log --format missing trailing newline character Alejandro Colomar
2024-12-23 20:36 ` Kristoffer Haugsbakk
2024-12-23 20:49   ` Alejandro Colomar
2024-12-23 21:09     ` Andreas Schwab
2024-12-23 21:23       ` Alejandro Colomar
2024-12-26 16:00         ` Junio C Hamano
2024-12-26 17:06           ` Alejandro Colomar

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.