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

Re: [PATCH] index-pack: correct --keep[=<msg>]

From
Jeff King <peff@peff.net>
Date
Mar 3, 2016, 19:47 UTC
Message-ID
<20160303194727.GA26087@sigill.intra.peff.net>
In-Reply-To
<xmqq1t7r2x21.fsf@gitster.mtv.corp.google.com>
On Thu, Mar 03, 2016 at 11:14:46AM -0800, Junio C Hamano wrote:
Show 11 quoted lines
> When 592ce208 (index-pack: use strip_suffix to avoid magic numbers,
> 2014-06-30) refactored the code to derive names of .idx and .keep
> files from the name of .pack file, a copy-and-paste typo crept in,
> mistakingly attempting to create and store the keep message file in
> the .idx file we just created, instead of .keep file.
> 
> As we create the .keep file with O_CREAT|O_EXCL, and we do so after
> we write the .idx file, we luckily do not clobber the .idx file, but
> because we deliberately ignored EEXIST when creating .keep file
> (which is justifiable because only the existence of .keep file
> matters), nobody noticed this mistake so far.
Eek. Sorry about that. Your explanation and fix looks obviously correct.
-Peff
Previous: Junio C HamanoNext: Junio C Hamano
Message 2 of 9 in “index-pack: correct --keep[=<msg>]”
  1. index-pack: correct --keep[=<msg>]Junio C Hamano, Mar 3, 2016
  2. Jeff KingMar 3, 2016
  3. index-pack: add a helper function to derive .idx/.keep filenameJunio C Hamano, Mar 3, 2016
  4. Jeff KingMar 3, 2016
  5. index-pack: --clone-bundle optionJunio C Hamano, Mar 3, 2016
  6. Junio C HamanoMar 3, 2016
  7. Jeff KingMar 4, 2016
  8. Jeff KingMar 4, 2016
  9. Eric SunshineMar 3, 2016

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.