imap-send: eliminate HMAC deprecation warnings on Mac OS X
[gitweb.git] / builtin / merge-tree.c
index ed25d81b880eb830481d4e729d7e9acc3266de65..61cbde4094bf27ea9dfaba158233ba7f4613f2ee 100644 (file)
@@ -251,7 +251,11 @@ static void unresolved(const struct traverse_info *info, struct name_entry n[3])
 
        for (i = 0; i < 3; i++) {
                mask |= (1 << i);
-               if (n[i].mode && S_ISDIR(n[i].mode))
+               /*
+                * Treat missing entries as directories so that we return
+                * after unresolved_directory has handled this.
+                */
+               if (!n[i].mode || S_ISDIR(n[i].mode))
                        dirmask |= (1 << i);
        }
 
@@ -302,7 +306,7 @@ static void unresolved(const struct traverse_info *info, struct name_entry n[3])
 static int threeway_callback(int n, unsigned long mask, unsigned long dirmask, struct name_entry *entry, struct traverse_info *info)
 {
        /* Same in both? */
-       if (same_entry(entry+1, entry+2) || both_empty(entry+0, entry+2)) {
+       if (same_entry(entry+1, entry+2) || both_empty(entry+1, entry+2)) {
                /* Modified, added or removed identically */
                resolve(info, NULL, entry+1);
                return mask;