From: Junio C Hamano Date: Sun, 22 Aug 2010 06:28:05 +0000 (-0700) Subject: Merge branch 'nd/fix-sparse-checkout' X-Git-Tag: v1.7.3-rc0~51 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=c3b9325fa699dfa2562ac3748d14f082646979c2;p=git.git Merge branch 'nd/fix-sparse-checkout' * nd/fix-sparse-checkout: unpack-trees: mark new entries skip-worktree appropriately unpack-trees: do not check for conflict entries too early unpack-trees: let read-tree -u remove index entries outside sparse area unpack-trees: only clear CE_UPDATE|CE_REMOVE when skip-worktree is always set t1011 (sparse checkout): style nitpicks --- c3b9325fa699dfa2562ac3748d14f082646979c2 diff --cc unpack-trees.c index 62852aa7f,8b1621532..3c7a7c9cd --- a/unpack-trees.c +++ b/unpack-trees.c @@@ -1180,8 -1094,10 +1184,10 @@@ static int merged_entry(struct cache_en int update = CE_UPDATE; if (!old) { - if (verify_absent(merge, "overwritten", o)) + if (verify_absent(merge, ERROR_WOULD_LOSE_UNTRACKED_OVERWRITTEN, o)) return -1; + if (!o->skip_sparse_checkout && will_have_skip_worktree(merge, o)) + update |= CE_SKIP_WORKTREE; invalidate_ce_path(merge, o); } else if (!(old->ce_flags & CE_CONFLICTED)) { /*