]> git.ipfire.org Git - thirdparty/git.git/blobdiff - builtin/merge-tree.c
Fix sparse warnings
[thirdparty/git.git] / builtin / merge-tree.c
index fc00d794d641c146023a78d7d8e4143f0fdac302..19917426fba19cf60b838ff9b07d20b5e44259a5 100644 (file)
@@ -1,4 +1,4 @@
-#include "cache.h"
+#include "builtin.h"
 #include "tree-walk.h"
 #include "xdiff-interface.h"
 #include "blob.h"
@@ -60,6 +60,7 @@ static void *result(struct merge_list *entry, unsigned long *size)
 {
        enum object_type type;
        struct blob *base, *our, *their;
+       const char *path = entry->path;
 
        if (!entry->stage)
                return read_sha1_file(entry->blob->object.sha1, &type, size);
@@ -76,7 +77,7 @@ static void *result(struct merge_list *entry, unsigned long *size)
        their = NULL;
        if (entry)
                their = entry->blob;
-       return merge_file(entry->path, base, our, their, size);
+       return merge_file(path, base, our, their, size);
 }
 
 static void *origin(struct merge_list *entry, unsigned long *size)