summaryrefslogtreecommitdiff
path: root/commit.c
diff options
context:
space:
mode:
authorJonathan Nieder <jrnieder@gmail.com>2018-05-15 23:42:18 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-05-16 02:42:03 (GMT)
commit3f5787f80662b8f5dbd6fb83d5ca20be224e8a08 (patch)
tree887f16f248e5842981b299af011a83fa71af9abd /commit.c
parentbe479e801da46b591844467229f003cdcd262e3e (diff)
downloadgit-3f5787f80662b8f5dbd6fb83d5ca20be224e8a08.zip
git-3f5787f80662b8f5dbd6fb83d5ca20be224e8a08.tar.gz
git-3f5787f80662b8f5dbd6fb83d5ca20be224e8a08.tar.bz2
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 'commit.c')
-rw-r--r--commit.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/commit.c b/commit.c
index 2cd5b8a..4e8d348 100644
--- a/commit.c
+++ b/commit.c
@@ -112,7 +112,7 @@ static int commit_graft_pos_the_repository(const unsigned char *sha1)
commit_graft_sha1_access);
}
-int register_commit_graft(struct commit_graft *graft, int ignore_dups)
+int register_commit_graft_the_repository(struct commit_graft *graft, int ignore_dups)
{
int pos = commit_graft_pos(the_repository, graft->oid.hash);
@@ -188,7 +188,7 @@ static int read_graft_file(const char *graft_file)
struct commit_graft *graft = read_graft_line(&buf);
if (!graft)
continue;
- if (register_commit_graft(graft, 1))
+ if (register_commit_graft(the_repository, graft, 1))
error("duplicate graft data: %s", buf.buf);
}
fclose(fp);