]> asedeno.scripts.mit.edu Git - git.git/blobdiff - read-cache.c
Merge branch 'js/commit-format'
[git.git] / read-cache.c
index 605b35239674c72a272e1c0fc1fb886c4b75be46..7a104e351263ee47dc51bcca2ce2761fbd7f5092 100644 (file)
@@ -59,7 +59,7 @@ static int ce_compare_data(struct cache_entry *ce, struct stat *st)
 
        if (fd >= 0) {
                unsigned char sha1[20];
-               if (!index_fd(sha1, fd, st, 0, NULL))
+               if (!index_fd(sha1, fd, st, 0, OBJ_BLOB, ce->name))
                        match = hashcmp(sha1, ce->sha1);
                /* index_fd() closed the file descriptor already */
        }
@@ -72,7 +72,7 @@ static int ce_compare_link(struct cache_entry *ce, unsigned long expected_size)
        char *target;
        void *buffer;
        unsigned long size;
-       char type[10];
+       enum object_type type;
        int len;
 
        target = xmalloc(expected_size);
@@ -81,7 +81,7 @@ static int ce_compare_link(struct cache_entry *ce, unsigned long expected_size)
                free(target);
                return -1;
        }
-       buffer = read_sha1_file(ce->sha1, type, &size);
+       buffer = read_sha1_file(ce->sha1, &type, &size);
        if (!buffer) {
                free(target);
                return -1;