Re: [PATCH] fsck: warn about '.' and '..' in trees

2012-11-27 Thread Jeff King
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 w

Re: [PATCH] fsck: warn about '.' and '..' in trees

2012-11-27 Thread Jeff King
On Wed, Nov 28, 2012 at 11:22:20AM +0700, Nguyen Thai Ngoc Duy wrote: > > I don't think this is happening in the wild, but I did see somebody > > playing around with libgit2 make such a tree (and it is easy to do with > > git-mktree, of course). > > > > Technically one could use git with such a tr

Re: [PATCH] fsck: warn about '.' and '..' in trees

2012-11-27 Thread Nguyen Thai Ngoc Duy
On Wed, Nov 28, 2012 at 9:27 AM, Jeff King wrote: > A tree with meta-paths like '.' or '..' does not work well > with git; the index will refuse to load it or check it out > to the filesystem (and even if we did not have that safety, > it would look like we were overwriting an untracked > director

[PATCH] fsck: warn about '.' and '..' in trees

2012-11-27 Thread Jeff King
A tree with meta-paths like '.' or '..' does not work well with git; the index will refuse to load it or check it out to the filesystem (and even if we did not have that safety, it would look like we were overwriting an untracked directory). For the same reason, it is difficult to create such a tre