Merge part of 'sp/checkout'
[gitweb.git] / read-tree.c
index f39fe5ca653db7a4972cf99e790991c3d88495d0..be29b3fe11a370e53d3dce6a43dfccdc0e22ae2c 100644 (file)
@@ -560,9 +560,11 @@ static int threeway_merge(struct cache_entry **stages)
                 */
                if ((head_deleted && remote_deleted) ||
                    (head_deleted && remote && remote_match) ||
-                   (remote_deleted && head && head_match))
+                   (remote_deleted && head && head_match)) {
+                       if (index)
+                               return deleted_entry(index, index);
                        return 0;
-
+               }
                /*
                 * Added in both, identically.
                 */
@@ -704,7 +706,7 @@ static int read_cache_unmerged(void)
        return deleted;
 }
 
-static const char read_tree_usage[] = "git-read-tree (<sha> | -m [-u | -i] <sha1> [<sha2> [<sha3>]])";
+static const char read_tree_usage[] = "git-read-tree (<sha> | -m [--aggressive] [-u | -i] <sha1> [<sha2> [<sha3>]])";
 
 static struct cache_file cache_file;