diff options
author | Karthik Nayak <karthik.188@gmail.com> | 2024-12-03 15:43:59 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2024-12-04 00:21:54 +0100 |
commit | cc656f4eb2b7b10bc530c96844909c869bdd1fdf (patch) | |
tree | 24a6ddb8fa0fde090ead24c5b7961faa453b3803 /revision.c | |
parent | packfile: pass down repository to `odb_pack_name` (diff) | |
download | git-cc656f4eb2b7b10bc530c96844909c869bdd1fdf.tar.xz git-cc656f4eb2b7b10bc530c96844909c869bdd1fdf.zip |
packfile: pass down repository to `has_object[_kept]_pack`
The functions `has_object[_kept]_pack` currently rely on the global
variable `the_repository`. To eliminate global variable usage in
`packfile.c`, we should progressively shift the dependency on
the_repository to higher layers. Let's remove its usage from these
functions and any related ones.
Signed-off-by: Karthik Nayak <karthik.188@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'revision.c')
-rw-r--r-- | revision.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/revision.c b/revision.c index f5f5b84f2b..d1d152a67b 100644 --- a/revision.c +++ b/revision.c @@ -4103,10 +4103,10 @@ enum commit_action get_commit_action(struct rev_info *revs, struct commit *commi { if (commit->object.flags & SHOWN) return commit_ignore; - if (revs->unpacked && has_object_pack(&commit->object.oid)) + if (revs->unpacked && has_object_pack(revs->repo, &commit->object.oid)) return commit_ignore; if (revs->no_kept_objects) { - if (has_object_kept_pack(&commit->object.oid, + if (has_object_kept_pack(revs->repo, &commit->object.oid, revs->keep_pack_cache_flags)) return commit_ignore; } |