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

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

From
Junio C Hamano <gitster@pobox.com>
Date
Dec 22, 2007, 08:39 UTC
Message-ID
<7vhcibyvh0.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<57518fd10712210247s2fcbbf61ke67bbdc0f5ffe70b@mail.gmail.com>
"Jonathan del Strother" <maillist@steelskies.com> writes:
> Has anyone actually managed to reproduce my problem?  I've got
> multiple repos here that show the problem in several commits, made by
> different people.  However, I can't actually come up with a way to
> reproduce it at will...

Marking an issue as a "serious bug" without giving enough material for reproduction nor diagnosis tends to discourage people from looking into it seriously, as the issue cannot be even judged if it is really serious. For example:

  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.

I have been suspecting that there is a NUL in the middle of the message somehow (I know the lowest-level plumbing commit-tree allows any byte sequence in the log message if you worked hard enough), which the parser is not prepared to cope with, but we haven't seen enough evidence to support nor refute that theory. We do not have much to work from.

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

  $ git rev-list -1- --pretty=format:"%s%n%b"
  18d2480ab689b483ef1ebbdb3f7420904049ba0b
  commit 18d2480ab689b483ef1ebbdb3f7420904049ba0b
  Try to flush log files before terminating the app
  tree 57bc7cf30a10aee96251852125cf30fd2c81d7aa
  parent 04c833865828538315fcdf6e187da077869ce444
  author Jonathan del Strother <jon.delStrother@bestbefore.tv> 1197901755 +0000
  committer Jonathan del Strother <jon.delStrother@bestbefore.tv> 1197901755 +0000
  Check that ThreadWorker's work method actually returns a value with
  method signatures
Previous: Jonathan del StrotherNext: Jonathan del Strother
Message 13 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.