Treat D/F conflict entry more carefully in unpack-trees.c::threeway_merge()
[gitweb.git] / archive-tar.c
index 7d52a061f4f8b5d29c52912889ca0d6ee46e4ee0..d9c30d33dc286fa2926c80f647304687ba13295b 100644 (file)
@@ -262,7 +262,7 @@ static int write_tar_entry(const unsigned char *sha1,
        static struct strbuf path;
        int filenamelen = strlen(filename);
        void *buffer;
-       char type[20];
+       enum object_type type;
        unsigned long size;
 
        if (!path.alloc) {
@@ -283,7 +283,7 @@ static int write_tar_entry(const unsigned char *sha1,
                buffer = NULL;
                size = 0;
        } else {
-               buffer = read_sha1_file(sha1, type, &size);
+               buffer = read_sha1_file(sha1, &type, &size);
                if (!buffer)
                        die("cannot read %s", sha1_to_hex(sha1));
        }