summaryrefslogtreecommitdiff
path: root/builtin/index-pack.c
diff options
context:
space:
mode:
authorStefan Beller <sbeller@google.com>2018-06-29 01:21:53 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-06-29 17:43:38 (GMT)
commit1ec5bfd24e57c8d40d3f7d911fb9b85723282a46 (patch)
tree9970da65f152e312829193145bbddecd846111f6 /builtin/index-pack.c
parent5abddd1eb72ca47cc84a9fc888c30ebaadde2eec (diff)
downloadgit-1ec5bfd24e57c8d40d3f7d911fb9b85723282a46.zip
git-1ec5bfd24e57c8d40d3f7d911fb9b85723282a46.tar.gz
git-1ec5bfd24e57c8d40d3f7d911fb9b85723282a46.tar.bz2
object: add repository argument to parse_object_buffer
Add a repository argument to allow the callers of parse_object_buffer to be more specific about which repository to act on. This is a small mechanical change; it doesn't change the implementation to handle repositories other than the_repository yet. As with the previous commits, use a macro to catch callers passing a repository other than the_repository at compile time. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/index-pack.c')
-rw-r--r--builtin/index-pack.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/builtin/index-pack.c b/builtin/index-pack.c
index 74fe297..9c08cf3 100644
--- a/builtin/index-pack.c
+++ b/builtin/index-pack.c
@@ -851,7 +851,8 @@ static void sha1_object(const void *data, struct object_entry *obj_entry,
* we do not need to free the memory here, as the
* buf is deleted by the caller.
*/
- obj = parse_object_buffer(oid, type, size, buf,
+ obj = parse_object_buffer(the_repository, oid, type,
+ size, buf,
&eaten);
if (!obj)
die(_("invalid %s"), type_name(type));