Re: git log doesn't allow %x00 in custom format anymore?

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

 



On Thu, Oct 07, 2010 at 03:25:29PM +0400, Kirill Likhodedov wrote:

> 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).

I can't reproduce using v1.7.2.3. Are you sure your pager or terminal
isn't hiding everything after the NUL? Have you tried piping it through
"xxd" or "cat -A"? I get:

  $ git log -1 --pretty=foo%x00bar | xxd
  0000000: 666f 6f00 6261 720a                      foo.bar.

  $ git log -1 --pretty=foo%x00bar | cat -A
  foo^@bar$

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

If it is not working, it is most definitely a bug.

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