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 <mforney@mforney.org> Acked-by: Derrick Stolee <dstolee@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
af6b65d45e
commit
ea3f7e598c
1
commit.h
1
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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user