Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Nieder <jrnieder@gmail.com>2018-05-16 02:42:18 +0300
committerJunio C Hamano <gitster@pobox.com>2018-05-16 05:42:03 +0300
commit3f5787f80662b8f5dbd6fb83d5ca20be224e8a08 (patch)
tree887f16f248e5842981b299af011a83fa71af9abd /shallow.c
parentbe479e801da46b591844467229f003cdcd262e3e (diff)
commit: add repository argument to register_commit_graft
Add a repository argument to allow callers of register_commit_graft to be more specific about which repository to handle. 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 'shallow.c')
-rw-r--r--shallow.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/shallow.c b/shallow.c
index c2f81a5a5a..ef802deed4 100644
--- a/shallow.c
+++ b/shallow.c
@@ -1,4 +1,5 @@
#include "cache.h"
+#include "repository.h"
#include "tempfile.h"
#include "lockfile.h"
#include "object-store.h"
@@ -38,7 +39,7 @@ int register_shallow(const struct object_id *oid)
graft->nr_parent = -1;
if (commit && commit->object.parsed)
commit->parents = NULL;
- return register_commit_graft(graft, 0);
+ return register_commit_graft(the_repository, graft, 0);
}
int is_repository_shallow(void)