path: root/builtin/reflog.c
diff options
authorStefan Beller <>2018-06-29 01:21:51 (GMT)
committerJunio C Hamano <>2018-06-29 17:43:38 (GMT)
commit109cd76dd3467bd05f8d2145b857006649741d5c (patch)
tree3b3baf8fb9861083f665e91e77e5ee07ec504747 /builtin/reflog.c
parentb16b60f71b2354cbad5f2dc16bd5f6cf7d617579 (diff)
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 <> Signed-off-by: Stefan Beller <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'builtin/reflog.c')
1 files changed, 2 insertions, 1 deletions
diff --git a/builtin/reflog.c b/builtin/reflog.c
index 0091192..948002b 100644
--- a/builtin/reflog.c
+++ b/builtin/reflog.c
@@ -2,6 +2,7 @@
#include "config.h"
#include "lockfile.h"
#include "object-store.h"
+#include "repository.h"
#include "commit.h"
#include "refs.h"
#include "dir.h"
@@ -129,7 +130,7 @@ static int commit_is_complete(struct commit *commit)
struct commit_list *parent;
c = (struct commit *)object_array_pop(&study);
- if (!c->object.parsed && !parse_object(&c->object.oid))
+ if (!c->object.parsed && !parse_object(the_repository, &c->object.oid))
c->object.flags |= INCOMPLETE;
if (c->object.flags & INCOMPLETE) {