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

2 messages, 2 authors, 2021-08-31 · 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-31 17:44:41

Taylor Blau [off-list ref] writes:
After (the rerolled version of) this series, we'll be in a state where:

  - `git multi-pack-index` will not run when outside of a Git
    repository.
  - The `--object-dir` argument will only recognize object directories
    belonging to an alternate of the current repository.
  - Using `--object-dir` to point to a repository which uses a
    different hash than the repository in the current working directory
    will continue to not work (as was the case before this series).
Hmph, re-reading the document for midx:

    --object-dir=<dir>::
            Use given directory for the location of Git objects. We check
            `<dir>/packs/multi-pack-index` for the current MIDX file, and
            `<dir>/packs` for the pack-files to index.

why does it matter if we are in a repository in the first place?
It's not like we combine the objects from the specified object dir
and our local object store (if that were the case, these two object
stores must be compatible).

How old is --object-dir option and how widely is it used?  Can we
just remove it and have users go to the repository that uses it
as its object store with "git -C <there>" mechanism, or have we come
too far with this (apparently broken) design to make such a fix
infeasible?

Thanks.

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

From: Taylor Blau <hidden>
Date: 2021-08-31 18:49:10

On Tue, Aug 31, 2021 at 10:44:38AM -0700, Junio C Hamano wrote:
Taylor Blau [off-list ref] writes:
quoted
After (the rerolled version of) this series, we'll be in a state where:

  - `git multi-pack-index` will not run when outside of a Git
    repository.
  - The `--object-dir` argument will only recognize object directories
    belonging to an alternate of the current repository.
  - Using `--object-dir` to point to a repository which uses a
    different hash than the repository in the current working directory
    will continue to not work (as was the case before this series).
Hmph, re-reading the document for midx:

    --object-dir=<dir>::
            Use given directory for the location of Git objects. We check
            `<dir>/packs/multi-pack-index` for the current MIDX file, and
            `<dir>/packs` for the pack-files to index.

why does it matter if we are in a repository in the first place?
It's not like we combine the objects from the specified object dir
and our local object store (if that were the case, these two object
stores must be compatible).
It shouldn't matter, but the use-case is described in [1] by Stolee.  He
explains it in detail, but I do think we have to live with
`--object-dir` in one way or another. He does say it'd be OK to only
be able to invoke it from within a repository, and to only be able to
reference alternates, though.

Thanks,
Taylor

[1]: https://lore.kernel.org/git/d23bca9b-9da2-984f-065c-6cf60a80ddef@gmail.com/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help