Re: [PATCH 2/2] read-cache.c: fix timestamp comparison
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Jan 21, 2008, 19:26 UTC
- Message-ID
- <alpine.LSU.1.00.0801211925580.5731@racer.site>
- In-Reply-To
- <alpine.LFD.1.00.0801211120350.2957@woody.linux-foundation.org>
Hi,
On Mon, 21 Jan 2008, Linus Torvalds wrote:
Show 20 quoted lines
> diff --git a/read-cache.c b/read-cache.c
> index f5f9c3d..58a9b95 100644
> --- a/read-cache.c
> +++ b/read-cache.c
> @@ -124,6 +124,9 @@ static int ce_match_stat_basic(struct cache_entry *ce, struct stat *st)
> {
> unsigned int changed = 0;
>
> + if (ce->ce_flags & CE_REMOVE)
> + return MODE_CHANGED | DATA_CHANGED | TYPE_CHANGED;
> +
> switch (ce->ce_mode & S_IFMT) {
> case S_IFREG:
> changed |= !S_ISREG(st->st_mode) ? TYPE_CHANGED : 0;
> @@ -145,8 +149,6 @@ static int ce_match_stat_basic(struct cache_entry *ce, struct stat *st)
> else if (ce_compare_gitlink(ce))
> changed |= DATA_CHANGED;
> return changed;
> - case 0: /* Special case: unmerged file in index */
> - return MODE_CHANGED | DATA_CHANGED | TYPE_CHANGED;Not that I understand what is _really_ going on, but shouldn't the comment be actually moved, not be deleted?
Ciao, Dscho