[PATCH] Update git-tag-script to create the .git/refs/tags if it does not already...
[git.git] / read-tree.c
index d86cc02..65f2d9a 100644 (file)
@@ -17,7 +17,7 @@ static int unpack_tree(unsigned char *sha1)
        buffer = read_object_with_reference(sha1, "tree", &size, NULL);
        if (!buffer)
                return -1;
-       ret = read_tree(buffer, size, stage);
+       ret = read_tree(buffer, size, stage, NULL);
        free(buffer);
        return ret;
 }
@@ -280,6 +280,12 @@ static int threeway_merge(struct cache_entry *stages[4],
                }
                /* otherwise we will apply the original rule */
        }
+       /* #14ALT */
+       if (a && b && c && same(a, b) && !same(a, c)) {
+               if (old && same(old, c))
+                       return merged_entry_allow_dirty(c, old, dst);
+               /* otherwise the regular rule applies */
+       }
        /*
         * If we have an entry in the index cache ("old"), then we want
         * to make sure that it matches any entries in stage 2 ("first
@@ -537,6 +543,7 @@ int main(int argc, char **argv)
                        merge = 1;
                        stage = 1;
                        read_cache_unmerged();
+                       continue;
                }
 
                /* "-m" stands for "merge", meaning we start in stage 1 */