summaryrefslogtreecommitdiffstats
path: root/packfile.h
diff options
context:
space:
mode:
authorKarthik Nayak <karthik.188@gmail.com>2024-12-03 15:43:58 +0100
committerJunio C Hamano <gitster@pobox.com>2024-12-04 00:21:54 +0100
commit873b00597bbf20c1bcda089a687641167b148fa2 (patch)
tree24fa801860fbbc927e83474a37d2fae858da0f99 /packfile.h
parentpackfile: pass `repository` to static function in the file (diff)
downloadgit-873b00597bbf20c1bcda089a687641167b148fa2.tar.xz
git-873b00597bbf20c1bcda089a687641167b148fa2.zip
packfile: pass down repository to `odb_pack_name`
The function `odb_pack_name` 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. Signed-off-by: Karthik Nayak <karthik.188@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'packfile.h')
-rw-r--r--packfile.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/packfile.h b/packfile.h
index aee69d1a0b..51187f2393 100644
--- a/packfile.h
+++ b/packfile.h
@@ -29,7 +29,8 @@ struct pack_entry {
*
* Example: odb_pack_name(out, sha1, "idx") => ".git/objects/pack/pack-1234..idx"
*/
-char *odb_pack_name(struct strbuf *buf, const unsigned char *sha1, const char *ext);
+char *odb_pack_name(struct repository *r, struct strbuf *buf,
+ const unsigned char *hash, const char *ext);
/*
* Return the basename of the packfile, omitting any containing directory