Re: [PATCH v4 05/25] midx: clear auxiliary .rev after replacing the MIDX

2 messages, 2 authors, 2021-08-27 · open the first message on its own page

Re: [PATCH v4 05/25] midx: clear auxiliary .rev after replacing the MIDX

From: Junio C Hamano <hidden>
Date: 2021-08-27 06:01:29

Taylor Blau [off-list ref] writes:
On Tue, Aug 24, 2021 at 03:06:55PM -0700, Junio C Hamano wrote:
quoted
Junio C Hamano [off-list ref] writes:
quoted
FWIW, here is what I have somewhere in 'seen' where two topics meet.
Oops, one change missed.
Thanks; that matches my own resolution. I noticed that it does fail the
new test in t5319, since writing a MIDX wants to make sure that we are
only touching an alternate's object directory (which will fail if we are
running `git multi-pack-index` from outside of a repository).

My opinion is that we should require being inside of a repository to run
the MIDX builtin. Otherwise we're allowing that command to modify any
old MIDX, which doesn't make sense.

I think we probably need a single unifying topic, so I'm happy if you
want to discard one of our two topics from seen in the meantime.
It seems that the *.rev test (probably added by the other topic that
is a single patch fix) fails under sha256 hash.  I am not going to
dig it any further myself, but for the interested, CI breakage is
here:

  https://github.com/git/git/runs/3440068613?check_suite_focus=true#step:5:1219

Thanks.

Re: [PATCH v4 05/25] midx: clear auxiliary .rev after replacing the MIDX

From: Taylor Blau <hidden>
Date: 2021-08-27 18:03:16

On Thu, Aug 26, 2021 at 11:01:26PM -0700, Junio C Hamano wrote:
It seems that the *.rev test (probably added by the other topic that
is a single patch fix) fails under sha256 hash.  I am not going to
dig it any further myself, but for the interested, CI breakage is
here:

  https://github.com/git/git/runs/3440068613?check_suite_focus=true#step:5:1219

Thanks.
I saw the same error myself when integrating that patch into my series.
I discussed it more in [1], but the failure is basically caused by the
midx code using the_hash_algo even when operating in a different
repository via --object-dir.

If the_hash_algo doesn't match (as is the case when using `--object-dir`
to point at a SHA-256 repository when invoking the builtin from a
repository using SHA-1 or outside of a repository altogether), then
we'll fail when trying to open the pack indexes.

Thanks,
Taylor

[1]: https://lore.kernel.org/git/YSgGBxh24UAZR5X3@nand.local/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help