2010/7/25 Jonathan Nieder <jrnie...@gmail.com>: > Frédéric Brière wrote: > >> I stumbled on this problem yesterday, working in a sparse checkout of >> linux-next. > > First of all, thanks for reporting this and sorry to take so long > to get back to you. > >> # See how the non-conflicting file is still in the index? >> git status >> >> # And see how reset --hard does not touch it, but --mixed does? >> git reset --hard >> git status >> git reset --mixed >> git status > > It seems that "read-tree --reset -u" should be somehow taught > to imply the effect of "read-tree --reset" (without -u). Duy: does > that seem reasonable? Are there any subtleties I should expect to > run into?
Still studying the code. But does this help? diff --git a/unpack-trees.c b/unpack-trees.c index 8cf0da3..32764c2 100644 --- a/unpack-trees.c +++ b/unpack-trees.c @@ -1439,7 +1439,7 @@ int oneway_merge(struct cache_entry **src, struct unpack_trees_options *o) if (old && same(old, a)) { int update = 0; - if (o->reset && !ce_uptodate(old) && !ce_skip_worktree(old)) { + if (o->reset && !ce_uptodate(old)) { struct stat st; if (lstat(old->name, &st) || ie_match_stat(o->src_index, old, &st, CE_MATCH_IGNORE_VALID|CE_MATCH_IGNORE_SKIP_WORKTREE)) -- Duy -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org