From 08f4f44501bef21e10a1a449b8ba2d2710835b48 Mon Sep 17 00:00:00 2001 From: Stefan Beller Date: Thu, 28 Jun 2018 18:22:00 -0700 Subject: commit: add repository argument to parse_commit_buffer Add a repository argument to allow the callers of parse_commit_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 Signed-off-by: Stefan Beller Signed-off-by: Junio C Hamano --- sha1-file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sha1-file.c') diff --git a/sha1-file.c b/sha1-file.c index de4839e634..75ba30b4ab 100644 --- a/sha1-file.c +++ b/sha1-file.c @@ -1801,7 +1801,7 @@ static void check_commit(const void *buf, size_t size) { struct commit c; memset(&c, 0, sizeof(c)); - if (parse_commit_buffer(&c, buf, size, 0)) + if (parse_commit_buffer(the_repository, &c, buf, size, 0)) die("corrupt commit"); } -- cgit v1.2.3