diff options
author | Karthik Nayak <karthik.188@gmail.com> | 2024-12-03 15:43:55 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2024-12-04 00:21:53 +0100 |
commit | 2cf3fe63f6eedd6d132c530b897595345a05088b (patch) | |
tree | 0f595b48971febb4fc7f5240b26aada3dc448a51 /compat | |
parent | The seventh batch (diff) | |
download | git-2cf3fe63f6eedd6d132c530b897595345a05088b.tar.xz git-2cf3fe63f6eedd6d132c530b897595345a05088b.zip |
packfile: add repository to struct `packed_git`
The struct `packed_git` holds information regarding a packed object
file. Let's add the repository variable to this object, to represent the
repository that this packfile belongs to. This helps remove dependency
on the global `the_repository` object in `packfile.c` by simply using
repository information now readily available in the struct.
We do need to consider that a packfile could be part of the alternates
of a repository, but considering that we only have one repository struct
and also that we currently anyways use 'the_repository', we should be
OK with this change.
We also modify `alloc_packed_git` to ensure that the repository is added
to newly created `packed_git` structs. This requires modifying the
function and all its callee to pass the repository object down the
levels.
Helped-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Karthik Nayak <karthik.188@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'compat')
0 files changed, 0 insertions, 0 deletions