aboutsummaryrefslogtreecommitdiff
path: root/pack.h
diff options
context:
space:
mode:
authorKarthik Nayak <karthik.188@gmail.com>2025-01-19 12:19:27 +0100
committerJunio C Hamano <gitster@pobox.com>2025-01-21 12:36:34 -0800
commite2f6f7658559246ea03015fc7b999af2cd20c122 (patch)
treecd93091d749f4fe25bb6af929fa81fb672536bd8 /pack.h
parent8244d01de6402606c9fb588ce2143aa629aa7d0e (diff)
downloadgit-e2f6f7658559246ea03015fc7b999af2cd20c122.tar.xz
pack-write: pass repository to `index_pack_lockfile()`
The `index_pack_lockfile()` function uses the global `the_repository` variable to access the repository. To avoid global variable usage, pass the repository from the layers above. Altough the layers above could have access to the repository internally, simply pass in `the_repository`. This avoids any compatibility issues and bubbles up global variable usage to upper layers which can be eventually resolved. Signed-off-by: Karthik Nayak <karthik.188@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'pack.h')
-rw-r--r--pack.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/pack.h b/pack.h
index 6d9d477adc..46d85e5bec 100644
--- a/pack.h
+++ b/pack.h
@@ -94,7 +94,7 @@ off_t write_pack_header(struct hashfile *f, uint32_t);
void fixup_pack_header_footer(const struct git_hash_algo *, int,
unsigned char *, const char *, uint32_t,
unsigned char *, off_t);
-char *index_pack_lockfile(int fd, int *is_well_formed);
+char *index_pack_lockfile(struct repository *r, int fd, int *is_well_formed);
struct ref;