Git development
 help / color / mirror / Atom feed
From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: Daniel Barkalow <barkalow@iabervon.org>
Cc: Junio C Hamano <junkio@cox.net>, git@vger.kernel.org
Subject: Re: [PATCH 4/9] Discard "deleted" cache entries after using them to update the working tree
Date: Tue, 5 Feb 2008 01:25:52 +0000 (GMT)	[thread overview]
Message-ID: <alpine.LSU.1.00.0802050123330.8543@racer.site> (raw)
In-Reply-To: <alpine.LNX.1.00.0802041335470.13593@iabervon.org>

Hi,

On Mon, 4 Feb 2008, Daniel Barkalow wrote:

> Way back in read-tree.c, we used a mode 0 cache entry to indicate that 
> an entry had been deleted, so that the update code would remove the 
> working tree file, and we would just skip it when writing out the index 
> file afterward.
> 
> These days, unpack_trees is a library function, and it is still leaving 
> these entries in the active cache. Furthermore, unpack_trees doesn't 
> correctly ignore those entries, and who knows what other code wouldn't 
> expect them to be there, but just isn't yet called after a call to 
> unpack_trees. To avoid having other code trip over these entries, have 
> check_updates() remove them after it removes the working tree files.
> 
> While we're at it, make the loop more obvious and skip passing in 
> globals to a static function with only one caller.

After reading the code I understand what you mean.  How about

	While at it, make the loop removing those entries more obvious, 
	and avoid passing global variables as parameters to 
	check_updates(): there is only one call site anyway.

Ciao,
Dscho

  reply	other threads:[~2008-02-05  1:27 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-04 18:35 [PATCH 4/9] Discard "deleted" cache entries after using them to update the working tree Daniel Barkalow
2008-02-05  1:25 ` Johannes Schindelin [this message]
2008-02-05 20:38   ` Daniel Barkalow
  -- strict thread matches above, loose matches on Subject: below --
2008-01-25 23:24 Daniel Barkalow
2008-01-25 23:53 ` Junio C Hamano
2008-01-26  0:54   ` Daniel Barkalow

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.LSU.1.00.0802050123330.8543@racer.site \
    --to=johannes.schindelin@gmx.de \
    --cc=barkalow@iabervon.org \
    --cc=git@vger.kernel.org \
    --cc=junkio@cox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox