Code

Merge branch 'lt/oneway' into next
authorJunio C Hamano <junkio@cox.net>
Sun, 14 May 2006 23:58:44 +0000 (16:58 -0700)
committerJunio C Hamano <junkio@cox.net>
Sun, 14 May 2006 23:58:44 +0000 (16:58 -0700)
* lt/oneway:
  Simplify "git reset --hard"
  Allow one-way tree merge to remove old files

1  2 
read-tree.c

diff --cc read-tree.c
index c25385d79f605c74ae9e9cde06225f0a4c834f00,11157f42426d7f1783420e1a5fa72379ee759e6a..7c830312c403c328dc278d57fecb8d4381cbf2c3
@@@ -718,10 -683,8 +718,10 @@@ static int oneway_merge(struct cache_en
                return error("Cannot do a oneway merge of %d trees",
                             merge_size);
  
 -      if (!a)
 +      if (!a) {
 +              invalidate_ce_path(old);
-               return 0;
+               return deleted_entry(old, NULL);
 +      }
        if (old && same(old, a)) {
                return keep_entry(old);
        }