git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* git log doesn't allow %x00 in custom format anymore?
@ 2010-10-07 11:25 Kirill Likhodedov
  2010-10-07 14:10 ` Jeff King
  0 siblings, 1 reply; 19+ messages in thread
From: Kirill Likhodedov @ 2010-10-07 11:25 UTC (permalink / raw)
  To: git


Hello,

I've noticed that at least since Git 1.7.2.3 custom pretty format behaves strangely if there is a null-byte in the format:

Without null byte:
> git log --pretty=format:%H-%ct
Outputs something like:

ee5d714b95d133ff555bc8c7933dc752b5b277f5-1285954314
cb1b9dd688d9cf155257c94e749172820b56d87a-1285954240
b4c75be10b14d021003853e527e47ad88dc5a55b-1285833610
1963187da6a45f898e62e4e922faac6b9382b4e4-1285807494

With a null byte
> git log --pretty=format:%H%x00%ct
Ignores anything appearing after the null byte:

ee5d714b95d133ff555bc8c7933dc752b5b277f5
cb1b9dd688d9cf155257c94e749172820b56d87a
b4c75be10b14d021003853e527e47ad88dc5a55b
1963187da6a45f898e62e4e922faac6b9382b4e4

Other bytes behave fine. 

Using %x00 worked in Git 1.7.1 and stopped working in 1.7.2.3 (or even earlier).

Is it a bug or a feature (not allowing null bytes in the custom format anymore)?

If it is a feature, the documentation should have note about it. Now it's even proposing to use %x00:
            %x00: print a byte from a hex code

Thanks a lot.

----------------------------------
Kirill Likhodedov
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

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

end of thread, other threads:[~2010-10-07 18:37 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-07 11:25 git log doesn't allow %x00 in custom format anymore? Kirill Likhodedov
2010-10-07 14:10 ` Jeff King
2010-10-07 14:35   ` Kirill Likhodedov
2010-10-07 14:46     ` Jeff King
2010-10-07 15:07     ` Johannes Sixt
2010-10-07 15:18       ` Kirill Likhodedov
2010-10-07 17:29         ` Jeff King
2010-10-07 17:40           ` Matthieu Moy
2010-10-07 18:02             ` Drew Northup
2010-10-07 17:41           ` Erik Faye-Lund
2010-10-07 17:43             ` Erik Faye-Lund
2010-10-07 17:50             ` Jeff King
2010-10-07 17:52             ` Matthieu Moy
2010-10-07 17:53               ` Jeff King
2010-10-07 18:05                 ` Erik Faye-Lund
2010-10-07 18:13                   ` Jeff King
2010-10-07 18:19                     ` Erik Faye-Lund
2010-10-07 18:33                       ` Jeff King
2010-10-07 18:37                         ` Erik Faye-Lund

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).