Code

Merge branch 'nd/fix-sparse-checkout'
authorJunio C Hamano <gitster@pobox.com>
Sun, 22 Aug 2010 06:28:05 +0000 (23:28 -0700)
committerJunio C Hamano <gitster@pobox.com>
Sun, 22 Aug 2010 06:28:05 +0000 (23:28 -0700)
* 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

1  2 
cache.h
unpack-trees.c

diff --cc cache.h
Simple merge
diff --cc unpack-trees.c
index 62852aa7fb3fbd5e2d3ae1173d05deddba763d52,8b162153229db5d5dadbdbcacca3754f77618bdf..3c7a7c9cde745c1b438f60aceea7e556dded81d7
@@@ -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)) {
                /*