On Tue, Jul 7, 2009 at 12:48 PM, Junio C Hamano<gitster@xxxxxxxxx> wrote: > Jeff King <peff@xxxxxxxx> writes: > >> .... But even that might have holes, >> I'm afraid -- we don't always look at all of the config in every >> command, though perhaps we do for such core functionality. > > I personally do not think it is worth it. If you change the crlf, > clean/smudge, or anything of that sort, just doing a "rm .git/index" > followed by "git reset --hard" would restore sanity to your work tree, no? Is there any technical reason why "git reset --hard" shouldn't repopulate the index by doing a "git read-tree" or equivalent [1]? After all the docs claim it "Matches the working tree and index to that of the tree being switched to". Except in this case it doesn't. The resulting .index is an invalid representation of the tree. Sanity can be restored with "git read-tree HEAD" (as Jeff suggested), but that's hardly intuitive. - Eric [1] For instance anything at all (possibly involving time stamps) such that the index will truly match the tree. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html