diff options
author | Karthik Nayak <karthik.188@gmail.com> | 2024-12-03 15:44:00 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2024-12-04 00:21:54 +0100 |
commit | c87910b96b1223d4a1dfe65c04e03863fadef6bc (patch) | |
tree | 4fbd9e0eda5efb0be743f8b354e19200253d52a1 /tag.c | |
parent | packfile: pass down repository to `has_object[_kept]_pack` (diff) | |
download | git-c87910b96b1223d4a1dfe65c04e03863fadef6bc.tar.xz git-c87910b96b1223d4a1dfe65c04e03863fadef6bc.zip |
packfile: pass down repository to `for_each_packed_object`
The function `for_each_packed_object` currently relies 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 this
function and closely related function `is_promisor_object`.
Signed-off-by: Karthik Nayak <karthik.188@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'tag.c')
-rw-r--r-- | tag.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -84,7 +84,7 @@ struct object *deref_tag(struct repository *r, struct object *o, const char *war o = NULL; } if (!o && warn) { - if (last_oid && is_promisor_object(last_oid)) + if (last_oid && is_promisor_object(r, last_oid)) return NULL; if (!warnlen) warnlen = strlen(warn); |