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

Re: Serious bug with pretty format strings & empty bodies?

From
Jonathan del Strother <maillist@steelskies.com>
Date
Dec 22, 2007, 15:48 UTC
Message-ID
<57518fd10712220748v188d769eo204fcc572993395e@mail.gmail.com>
In-Reply-To
<7vhcibyvh0.fsf@gitster.siamese.dyndns.org>
On Dec 22, 2007 8:39 AM, Junio C Hamano <gitster@pobox.com> wrote:
Show 16 quoted lines
>   On Dec 19, 2007 6:44 PM, Alex Riesen <raa.lkml@gmail.com> wrote:
>   > Could you try
>   >
>   >     git cat-file 18d2480ab689b483ef1ebbdb3f7420904049ba0b
>   >
>   > (or any other problematic commit) and post its output here?
>
>   You mean git cat-file commit ... ?
>   I get the normal output, but the problematic commits don't show a
>   newline character at the end of the cat-file output.
>
> "I get the normal output" is not what Alex asked you to supply,
> nor would be sufficient information.  There may be some
> abnormality in the commit object that you probably did not spot,
> but Alex or other people may have been able to if you were
> actually posted its output here.

======== $ git cat-file commit 18d2480ab689b483ef1ebbdb3f7420904049ba0b tree 2416c620c6f7c1864065a6e778588b71b3e0bd5d parent 9fc80d0a05835c68885f253844ab586b38d09202 author Jonathan del Strother <jon.delStrother@bestbefore.tv> 1197907511 +0000 committer Jonathan del Strother <jon.delStrother@bestbefore.tv> 1197907511 +0000

Try to flush log files before terminating the app% ======== The '%' suffix is zsh showing that there's no newline there. Under bash I get no '%' and the next prompt starts immediately following 'app'.

> One thing I noticed funny in your original message was "-1-".
> Is it essential that the number is spelled incorrectly to
> reproduce this problem?

No, sorry - I don't know how that got there. I get identical output whether it's "rev-list -1" or "rev-list -1-"

I've been trying to reproduce this on my home repo, and have only been partially successful. I haven't been able to make git rev-list -1 show a malformed message body. I can only get the problem to occur when printing multiple commits (eg git rev-list -20 ...) Bizarrely, the first 2 commits shown in rev-list never show a problem. After the first 2, commits with the broken message bodies will always appear broken, regardless of their position in the list. However, the content that appears instead of the body will change depending on the commits that appear prior to that one.

I realise this doesn't appear to mesh with my observations the other day, where I was seeing the broken bodies even when just using rev-list -1 - I'm at a loss to describe it. Both machines are intel macs (one a MacPro, one a MacBook Pro), running OS X 10.5.1, with the same git version (1.5.4.rc0.1162.g3bfea). Unfortunately I've switched my work machine off for christmas, or I'd ssh in and try to re-verify things.

I do appreciate people's help in trying to reproduce & fix this - I realise I've not given people much to go on.

Previous: Junio C HamanoNext: Jonathan del Strother
Message 14 of 16 in “Serious bug with pretty format strings & empty bodies?”
  1. Jonathan del StrotherDec 19, 2007
  2. René ScharfeDec 19, 2007
  3. Jonathan del StrotherDec 20, 2007
  4. Jonathan del StrotherDec 20, 2007
  5. Alex RiesenDec 19, 2007
  6. Jonathan del StrotherDec 19, 2007
  7. René ScharfeDec 19, 2007
  8. Jonathan del StrotherDec 20, 2007
  9. René ScharfeDec 20, 2007
  10. Johannes SchindelinDec 20, 2007
  11. Jonathan del StrotherDec 20, 2007
  12. Jonathan del StrotherDec 21, 2007
  13. Junio C HamanoDec 22, 2007
  14. Jonathan del StrotherDec 22, 2007
  15. Jonathan del StrotherDec 20, 2007
  16. Johannes SchindelinDec 20, 2007

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.