From ea3f7e598c8f1171f0bd02da777dc526cdb8424d Mon Sep 17 00:00:00 2001 From: Michael Forney Date: Tue, 23 Jun 2020 13:56:58 -0700 Subject: revision: use repository from rev_info when parsing commits This is needed when repo_init_revisions() is called with a repository that is not the_repository to ensure appropriate repository is used in repo_parse_commit_internal(). If the wrong repository is used, a fatal error is the commit-graph machinery occurs: fatal: invalid commit position. commit-graph is likely corrupt Since revision.c was the only user of the parse_commit_gently compatibility define, remove it from commit.h. Signed-off-by: Michael Forney Acked-by: Derrick Stolee Signed-off-by: Junio C Hamano --- commit.h | 1 - 1 file changed, 1 deletion(-) (limited to 'commit.h') diff --git a/commit.h b/commit.h index 008a0fa4a0..28761e61ed 100644 --- a/commit.h +++ b/commit.h @@ -97,7 +97,6 @@ static inline int parse_commit_no_graph(struct commit *commit) #ifndef NO_THE_REPOSITORY_COMPATIBILITY_MACROS #define parse_commit_internal(item, quiet, use) repo_parse_commit_internal(the_repository, item, quiet, use) -#define parse_commit_gently(item, quiet) repo_parse_commit_gently(the_repository, item, quiet) #define parse_commit(item) repo_parse_commit(the_repository, item) #endif -- cgit v1.2.3