]> git.ipfire.org Git - thirdparty/git.git/commit - revision.c
revision: use repository from rev_info when parsing commits
authorMichael Forney <mforney@mforney.org>
Tue, 23 Jun 2020 20:56:58 +0000 (13:56 -0700)
committerJunio C Hamano <gitster@pobox.com>
Wed, 24 Jun 2020 16:13:04 +0000 (09:13 -0700)
commitea3f7e598c8f1171f0bd02da777dc526cdb8424d
treec002d0b9b6597c1d969b22b6929c70e6eb3ce028
parentaf6b65d45ef179ed52087e80cb089f6b2349f4ec
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>
commit.h
revision.c