Re: [PATCH v4 05/25] midx: clear auxiliary .rev after replacing the MIDX
- From
Taylor Blau <me@ttaylorr.com>
- Date
- Aug 30, 2021, 00:43 UTC
- Message-ID
- <YSwpsp/hQsPFnj+I@nand.local>
- In-Reply-To
- <xmqqfsur7otx.fsf@gitster.g>
On Sun, Aug 29, 2021 at 05:34:18PM -0700, Junio C Hamano wrote:
Show 12 quoted lines
> Taylor Blau <me@ttaylorr.com> writes: > > > now or later would affect this series. Even if we just disallow > > --object-dir pointing at a non-alternate repository, we would still have > > the issue of having alternate chains which don't all have the same > > object format. > > Exactly. That is why I feel that it probably needs to be dealt with > before doing anything else. The alternate mechanism pulling in an > object store that uses incompatible hash algo would break not just > the multi-pack-index but probably the basic object access layer as > well, which would be more grave problem, no?
Yeah; it does. Maybe I'm holding it wrong (and brian, cc'd, can help me), but this is an easy way to see the problem:
git init repo git init alternate
git -C repo commit --allow-empty -m foo ( cd repo/.git/objects && pwd ) >alternate/.git/objects/info/alternates git -C alternate rev-list --objects --alternate-refs
which will produce:
$ git rev-list --objects --alternate-refs
warning: invalid line while parsing alternate refs: <sha256 id>But I don't know if I quite understand your "probably needs to be dealt with before doing anything else". I think we can proceed with this series and deal with the alternate object-format thing separately, no?
Thanks, Taylor