am: avoid directory rename detection when calling recursive merge machinery
[gitweb.git] / archive-tar.c
index fd622eacc0d9a8a80dcb9fe509fd5b405e208f1a..b6f58ddf38767d86f866bd9413292e279c6cfa73 100644 (file)
@@ -119,7 +119,7 @@ static int stream_blocked(const struct object_id *oid)
        char buf[BLOCKSIZE];
        ssize_t readlen;
 
-       st = open_istream(oid->hash, &type, &sz, NULL);
+       st = open_istream(oid, &type, &sz, NULL);
        if (!st)
                return error("cannot stream blob %s", oid_to_hex(oid));
        for (;;) {
@@ -276,7 +276,7 @@ static int write_tar_entry(struct archiver_args *args,
                memcpy(header.name, path, pathlen);
 
        if (S_ISREG(mode) && !args->convert &&
-           sha1_object_info(oid->hash, &size) == OBJ_BLOB &&
+           oid_object_info(the_repository, oid, &size) == OBJ_BLOB &&
            size > big_file_threshold)
                buffer = NULL;
        else if (S_ISLNK(mode) || S_ISREG(mode)) {
@@ -441,7 +441,7 @@ static int write_tar_filter_archive(const struct archiver *ar,
        int r;
 
        if (!ar->data)
-               die("BUG: tar-filter archiver called with no filter defined");
+               BUG("tar-filter archiver called with no filter defined");
 
        strbuf_addstr(&cmd, ar->data);
        if (args->compression_level >= 0)