]> git.ipfire.org Git - thirdparty/git.git/commitdiff
archive.c: remove implicit dependency the_repository
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>
Sat, 15 Sep 2018 16:17:37 +0000 (18:17 +0200)
committerJunio C Hamano <gitster@pobox.com>
Mon, 17 Sep 2018 16:20:06 +0000 (09:20 -0700)
The new "repo" field in archive_args has been added since b612ee202a
(archive.c: avoid access to the_index - 2018-08-13). Use it instead of
hard coding the_repository.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
archive.c

index 0a07b140fedd8fb1f14dd844dae9844641842c57..994495af05bf89ad7f476d85cb43419f826955ca 100644 (file)
--- a/archive.c
+++ b/archive.c
@@ -391,7 +391,7 @@ static void parse_treeish_arg(const char **argv,
        if (get_oid(name, &oid))
                die("Not a valid object name");
 
-       commit = lookup_commit_reference_gently(the_repository, &oid, 1);
+       commit = lookup_commit_reference_gently(ar_args->repo, &oid, 1);
        if (commit) {
                commit_sha1 = commit->object.oid.hash;
                archive_time = commit->date;