summaryrefslogtreecommitdiffstats
path: root/merge-recursive.c
diff options
context:
space:
mode:
authorStefan Beller <sbeller@google.com>2018-06-28 18:21:51 -0700
committerJunio C Hamano <gitster@pobox.com>2018-06-29 10:43:38 -0700
commit109cd76dd3467bd05f8d2145b857006649741d5c (patch)
tree3b3baf8fb9861083f665e91e77e5ee07ec504747 /merge-recursive.c
parentb16b60f71b2354cbad5f2dc16bd5f6cf7d617579 (diff)
downloadgit-109cd76dd3467bd05f8d2145b857006649741d5c.tar.gz
git-109cd76dd3467bd05f8d2145b857006649741d5c.tar.xz
object: add repository argument to parse_object
Add a repository argument to allow the callers of parse_object 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 'merge-recursive.c')
-rw-r--r--merge-recursive.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/merge-recursive.c b/merge-recursive.c
index 0e9f5a62e..63bc0e2a0 100644
--- a/merge-recursive.c
+++ b/merge-recursive.c
@@ -9,6 +9,7 @@
#include "lockfile.h"
#include "cache-tree.h"
#include "object-store.h"
+#include "repository.h"
#include "commit.h"
#include "blob.h"
#include "builtin.h"
@@ -3466,7 +3467,8 @@ static struct commit *get_ref(const struct object_id *oid, const char *name)
{
struct object *object;
- object = deref_tag(parse_object(oid), name, strlen(name));
+ object = deref_tag(parse_object(the_repository, oid), name,
+ strlen(name));
if (!object)
return NULL;
if (object->type == OBJ_TREE)