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

Re: Be more careful about updating refs

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Jan 17, 2008, 12:58 UTC
Message-ID
<alpine.LSU.1.00.0801171256280.17650@racer.site>
In-Reply-To
<478F4CDC.2090703@viscovery.net>
Hi,
On Thu, 17 Jan 2008, Johannes Sixt wrote:
Show 18 quoted lines
> Charles Bailey schrieb:
> > On Thu, Jan 17, 2008 at 11:52:23AM +0100, Johannes Sixt wrote:
> >> I observed the same (on Windows). The reason is that above-mentioned
> >> commit introduces a call to parse_objects(). But by the time that
> >> fast-import calls write_ref_sha1() (and, hence, this new parse_objects())
> >> it has not yet written a pack file, and parse_objects() fails. I don't
> >> have a clue how to fix this short of reverting the commit.
> >>
> > 
> > OK, so it's not just Mac OS X, then.  From your description and my
> > initial poke at the code,  I can't immediately see a good reason why
> > the test should succeed on Linux, though.
> 
> My analysis is not correct. The pack file is present, but it seems to be
> incomplete.
> 
> The reason is the NO_MMAP build flag. If you compile with
> NO_MMAP=YesPlease on Linux, t9301 fails as well. Does this ring a bell?

Just a wild guess... Could it be that the mmap() happened before contents were written to that fd? The faked mmap() is just a malloc() && pread(), and would thus miss out on changes written after the mmap() call.

Ciao, Dscho

Previous: Johannes SixtNext: Charles Bailey
Message 8 of 23 in “Be more careful about updating refs”
  1. Linus TorvaldsJan 15, 2008
  2. Linus TorvaldsJan 16, 2008
  3. Junio C HamanoJan 16, 2008
  4. Charles BaileyJan 17, 2008
  5. Johannes SixtJan 17, 2008
  6. Charles BaileyJan 17, 2008
  7. Johannes SixtJan 17, 2008
  8. Johannes SchindelinJan 17, 2008
  9. Charles BaileyJan 17, 2008
  10. Junio C HamanoJan 18, 2008
  11. Junio C HamanoJan 18, 2008
  12. Shawn O. PearceJan 18, 2008
  13. Junio C HamanoJan 18, 2008
  14. Shawn O. PearceJan 18, 2008
  15. Shawn O. PearceJan 18, 2008
  16. Shawn O. PearceJan 18, 2008
  17. Shawn O. PearceJan 18, 2008
  18. Shawn O. PearceJan 18, 2008
  19. Charles BaileyJan 17, 2008
  20. Junio C HamanoJan 16, 2008
  21. Linus TorvaldsJan 16, 2008
  22. Junio C HamanoJan 16, 2008
  23. Sam VilainJan 23, 2008

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.