From: Derrick Stolee <stolee@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Michael Forney <mforney@mforney.org>, git@vger.kernel.org
Subject: Re: [PATCH 1/2] revision: use repository from rev_info when parsing commits
Date: Fri, 4 Sep 2020 08:19:35 -0400 [thread overview]
Message-ID: <181e95c7-8b43-e548-7fc9-36fca140645d@gmail.com> (raw)
In-Reply-To: <xmqqzh667ca4.fsf@gitster.c.googlers.com>
On 9/3/2020 5:58 PM, Junio C Hamano wrote:
> Derrick Stolee <stolee@gmail.com> writes:
>
>> On 6/23/2020 4:56 PM, Michael Forney wrote:
>>> 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.
>>
>> Is this demonstrable in a test case, to prevent regressions?
>
> It appears that Michael tried and failed. Even if we do not
> currently have a caller that asks these functions in revision.c to
> work on a repository that is not the primary one (i.e. in a
> submodule), in which case these patches may not be fixing any bug
> that can be triggered in the current code, it is quite obvious that
> these functions misbehave once a caller starts asking them to work
> on a repository other than the primary one.
>
> So, given that ...
>
>>
>> I counted 9 copies of parse_commit[_gently]() in my version
>> of revision.c, so it looks like you caught them all.
>
> ... we should be able to proceed with the code as-is, I guess
Yes, I think this is an improvement regardless.
Thanks, for the reminder.
-Stolee
prev parent reply other threads:[~2020-09-04 12:20 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-23 20:56 [PATCH 1/2] revision: use repository from rev_info when parsing commits Michael Forney
2020-06-23 20:56 ` [PATCH 2/2] submodule: use submodule repository when preparing summary Michael Forney
2020-06-24 14:35 ` Derrick Stolee
2020-06-24 16:12 ` Junio C Hamano
2020-06-30 11:04 ` Michael Forney
2020-08-13 21:16 ` Michael Forney
2020-06-23 21:24 ` [PATCH 1/2] revision: use repository from rev_info when parsing commits Eric Sunshine
2020-06-24 14:29 ` Derrick Stolee
2020-09-03 21:58 ` Junio C Hamano
2020-09-04 12:19 ` Derrick Stolee [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=181e95c7-8b43-e548-7fc9-36fca140645d@gmail.com \
--to=stolee@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=mforney@mforney.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).