From: Jeff King Date: Wed, 28 Nov 2012 04:34:33 GMT Subject: Re: [PATCH] fsck: warn about '.' and '..' in trees Message-ID: <20121128043433.GB5362@sigill.intra.peff.net> In-Reply-To: <20121128043215.GA5362@sigill.intra.peff.net> On Tue, Nov 27, 2012 at 11:32:16PM -0500, Jeff King wrote: > $ check dot . > error: Invalid path '.' > > $ check dotdot .. > error: Updating '..' would lose untracked files in it > > $ check dotgit .git > error: Updating '.git' would lose untracked files in it > > Interesting that we detect the first one while reading into the cache, > but apparently try much harder to checkout on the latter two. Not sure I > want to try "git checkout -f". :) Actually, I take it back. The "untracked files" check comes _first_, and if you do "-f", we end up in the verify_path check when trying to pull the tree into the index. So I think the way git handles it makes sense. -Peff