git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Derrick Stolee <stolee@gmail.com>
To: Junio C Hamano <gitster@pobox.com>, git@vger.kernel.org
Subject: Re: What's cooking in git.git (Oct 2020, #02; Fri, 9)
Date: Fri, 9 Oct 2020 12:15:31 -0400	[thread overview]
Message-ID: <512a3dc5-4937-8679-c4c8-5144ac50450b@gmail.com> (raw)
In-Reply-To: <xmqq362nv18o.fsf@gitster.c.googlers.com>

On 10/9/2020 11:59 AM, Junio C Hamano wrote:
> * ds/commit-graph-merging-fix (2020-10-08) 1 commit
>  - commit-graph: ignore duplicates when merging layers
> 
>  When "git commit-graph" detects the same commit recorded more than
>  once while it is merging the layers, it used to die.  The code now
>  ignores all but one of them and continues.
> 
>  Shouldn't it make sure all copies match, or discard all of them, to
>  avoid random corruptions kept in the repository?

Making sure each copy matches is a bigger change than I would be
comfortable with in the rc window. If you intend for this to at
least be in a better state than before, then the current fix is
safer than doing that harder work. If we had a clear repro that
was testable, then I might have a different opinion. (I see that
Thomas updated the thread with a possible repro, I will get back
to him soon.)

As for discarding them all: we would need to add code to "reparse"
a commit from the object database. Perhaps that is doable, but we
have so far not removed data from a parsed 'struct commit'. This
is probably the easiest way forward to guarantee correct data here.
Again, let's find a way to test this before committing.

Thanks,
-Stolee


  reply	other threads:[~2020-10-09 16:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-09 15:59 What's cooking in git.git (Oct 2020, #02; Fri, 9) Junio C Hamano
2020-10-09 16:15 ` Derrick Stolee [this message]
2020-10-09 16:28   ` Junio C Hamano
2020-10-09 16:31     ` Derrick Stolee

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=512a3dc5-4937-8679-c4c8-5144ac50450b@gmail.com \
    --to=stolee@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /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.
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 NNTP newsgroup(s).