git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Kirill Likhodedov <kirill.likhodedov@jetbrains.com>
Date
Oct 7, 2010, 14:35 UTC
Message-ID
<5BA0D807-C5C0-4797-82CD-5D5087496D6F@jetbrains.com>
In-Reply-To
<20101007141015.GB8162@sigill.intra.peff.net>
My bad, this happens only on Windows (at least not on Mac OS X).

So it more likely is an msys porting problem or something like that, not a bug of Git itself. I've tested it on Windows XP SP3 with official installer for Git 1.7.2.3 and 1.7.3.1

I don't think it's a terminal problem. I've tried saving the output in a file: git log --pretty=format:%H%x00%ct >a.txt

I've also tried invoking the git process from a program and catching its output.
How could I report this bug? Or this message is enough? :)
07.10.2010, в 18:10, Jeff King написал(а):
Show 30 quoted lines
> 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

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

Previous: Jeff KingNext: Jeff King
Message 3 of 19 in “git log doesn't allow %x00 in custom format anymore?”
  1. Kirill LikhodedovOct 7, 2010
  2. Jeff KingOct 7, 2010
  3. Kirill LikhodedovOct 7, 2010
  4. Jeff KingOct 7, 2010
  5. Johannes SixtOct 7, 2010
  6. Kirill LikhodedovOct 7, 2010
  7. Jeff KingOct 7, 2010
  8. Matthieu MoyOct 7, 2010
  9. Drew NorthupOct 7, 2010
  10. Erik Faye-LundOct 7, 2010
  11. Erik Faye-LundOct 7, 2010
  12. Jeff KingOct 7, 2010
  13. Matthieu MoyOct 7, 2010
  14. Jeff KingOct 7, 2010
  15. Erik Faye-LundOct 7, 2010
  16. Jeff KingOct 7, 2010
  17. Erik Faye-LundOct 7, 2010
  18. Jeff KingOct 7, 2010
  19. Erik Faye-LundOct 7, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.