Re: [PATCH v4 00/25] multi-pack reachability bitmaps

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2021-08-25 at 03:36 -0400, Jeff King wrote:
> On Tue, Aug 24, 2021 at 10:10:12PM -0400, Taylor Blau wrote:
> 
> > > It's not clear to me that we have a resolution on whether calling "cd ..
> > > && git multi-pack-index write --object-dir repo.git" is supposed to
> > > work.
> > 
> > My recommendation would be to do the following things, all in a reroll
> > of this series:
> > 
> >   - Fix the bug by which we would delete a .rev or .bitmap file out of a
> >     different object store than we were working in (when the caller
> >     passes `--object-dir`).

That was what my patch did, afaict.

> >   - Disallow running `git multi-pack-index` outside of a Git repository.
> > 
> >   - Restrict `--object-dir` to only work with alternates of the
> >     repository in the current working directory.
> > 
> > To me, that seems like both the least-surprising behavior, and what
> > would lend itself to the easiest implementation. I would probably argue
> > that the existing behavior (where `--object-dir` would work against
> > arbitrary repositories) is a bug, and shouldn't continue to be
> > supported.
> 
> All of those seem reasonable to me, and are what I would suggest if we
> were starting from scratch. My only hesitation is whether people are
> using the weird behavior of --object-dir in the wild (e.g., are bup
> folks relying on it).
> 
> Johannes, is this something you're using _now_, and it works, or
> something you hoped to use in the future?

I was "hoping" to use

	git multi-pack-index --object-dir=... write

but never

	$ git multi-pack-index write --object-dir=...

which almost seems like it really is more like

	$ git -C ... multi-pack-index write

anyway, because you specify a repo? At least per the above example, I
never tried.


As I started playing with that again (I had done before, and it worked)
I noticed the segfault, hence my previous patch.


However, what I was thinking of doing is more outlined in this thread:
https://lore.kernel.org/git/20210820195558.44275-1-johannes@xxxxxxxxxxxxxxxx/


And essentially, as I described later in
https://lore.kernel.org/git/dbb24573efc3dd945acd8acdfd9fe627ad7cbcd2.camel@xxxxxxxxxxxxxxxx/

I have two only vaguely overlapping use cases.

One of them doesn't need "--object-dir", and the other requires that
[RFC PATCH] to be applied as well, which would basically let me use only
the small subset of git that is "git multi-pack-index" as machinery to
*just* do indexing, *without* really ever having a real "repository"
that git could otherwise operate on and worry about the actual objects
etc.

I might resend that with the code style issues fixed, but the objects
seemed more fundamental.

> But what I'm wondering is whether using --object-dir from outside a repo
> entirely is actually something that even works. I.e., would we be
> disabling a behavior that was not intended, but does happen to work? Or
> are we closing off a possibly buggy and half-working part of the system?

Well, it does work now, modulo the segfault, but that is actually a very
recent addition, I'd tried this before :)

johannes




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux