Re: [PATCH v2] unpack-trees: do not abort when overwriting an existing file with the same content
- From
Duy Nguyen <pclouds@gmail.com>
- Date
- Jan 22, 2013, 00:59 UTC
- Message-ID
- <CACsJy8AFKXYkHbUf4aqBpCg+v06oFsvHq_zxQFE4BOCzTDAqtg@mail.gmail.com>
- In-Reply-To
- <20130121231515.GD17156@sigill.intra.peff.net>
On Tue, Jan 22, 2013 at 6:15 AM, Jeff King <peff@peff.net> wrote:
Show 9 quoted lines
> Can you elaborate on when this code is triggered? > > In the general case, shouldn't we already know the sha1 of what's on > disk in the index, and be able to just compare the hashes? And if we > don't, because the entry is start-dirty, should we be updating it > (possibly earlier, so we do not even get into the "need to write" code > path) instead of doing this ad-hoc byte comparison? > > Confused...
git reset HEAD~10 # blah that was a mistake, undo it git checkout HEAD@{1}
I hit it a few times, probably not with the exact recipe above though.
-- Duy