]> git.ipfire.org Git - thirdparty/git.git/blobdiff - archive-tar.c
convert object type handling from a string to a number
[thirdparty/git.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));
        }