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

Re: [PATCH] builtin-commit: Refresh cache after adding files.

From
Kristian Høgsberg <krh@redhat.com>
Date
Nov 9, 2007, 17:13 UTC
Message-ID
<1194628412.30909.7.camel@hinata.boston.redhat.com>
In-Reply-To
<Pine.LNX.4.64.0711091702190.4362@racer.site>
On Fri, 2007-11-09 at 17:05 +0000, Johannes Schindelin wrote:
Show 11 quoted lines
> Hi,
> 
> On Fri, 9 Nov 2007, Kristian Høgsberg wrote:
> 
> > This fixes the race in the last test int t3700.
> 
> Well, it is not a race.  My fault.  I thought it was.
> 
> What you basically did was to make sure that the index is up-to-date after 
> adding the files.  You might even want to say that in the commit message, 
> and only then say that it fixes t3700, too.

OK, I guess what I was wondering was why write_cache() doesn't write out an up-to-date index. I'll send an updated patch. Do we need a call to refresh_cache() when we update the user cache but commit an index created from read_tree+add_files? I.e. after the add_files_to_index() call on line 97? The shell script doesn't do this, it only runs update-index --refresh for the index that gets committed.

Kristian
Previous: Johannes SchindelinNext: Johannes Schindelin
Message 3 of 14 in “builtin-commit: Refresh cache after adding files.”
  1. builtin-commit: Refresh cache after adding files.Kristian Høgsberg, Nov 9, 2007
  2. Johannes SchindelinNov 9, 2007
  3. Kristian HøgsbergNov 9, 2007
  4. Johannes SchindelinNov 9, 2007
  5. Kristian HøgsbergNov 9, 2007
  6. Junio C HamanoNov 9, 2007
  7. Kristian HøgsbergNov 9, 2007
  8. Junio C HamanoNov 10, 2007
  9. Johannes SchindelinNov 10, 2007
  10. Junio C HamanoNov 10, 2007
  11. git-add: make the entry stat-clean after re-adding the same contentsJunio C Hamano, Nov 10, 2007
  12. Linus TorvaldsNov 10, 2007
  13. 1/2 ce_match_stat, run_diff_files: use symbolic constants for readabilityJunio C Hamano, Nov 10, 2007
  14. 2/2 git-add: make the entry stat-clean after re-adding the same contentsJunio C Hamano, Nov 10, 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.