git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Patrick Steinhardt <ps@pks.im>
To: "brian m. carlson" <sandals@crustytoothpaste.net>,
	Angelo Dureghello <angelo@kernel-space.org>,
	git@vger.kernel.org
Subject: Re: [BUG] cannot git clone with includeif onbranch
Date: Tue, 12 Mar 2024 00:30:14 +0100	[thread overview]
Message-ID: <Ze-UBgQtoWK8Rk4F@tanuki> (raw)
In-Reply-To: <Zetw0I0NHgABR_PX@tapette.crustytoothpaste.net>

[-- Attachment #1: Type: text/plain, Size: 2691 bytes --]

On Fri, Mar 08, 2024 at 08:10:56PM +0000, brian m. carlson wrote:
> On 2024-03-08 at 19:25:52, Angelo Dureghello wrote:
> > Hi,
> > 
> > below the bug report, not totally sure this is a bug btw.
> > 
> > ---
> > 
> > Thank you for filling out a Git bug report!
> > Please answer the following questions to help us understand your issue.
> > 
> > What did you do before the bug happened? (Steps to reproduce your issue)
> > 
> > Perform a git clone https with includeif onbranch in the .gitconfig
> > 
> > Create a .gitconfig
> > with
> > [includeIf "onbranch:wip/pippo/**"]
> >         path = ~/.gitconfig.pippo.inc
> > 
> > git clone https://github.com/analogdevicesinc/no-OS.git
> > 
> > Cloning into 'no-OS'...
> > BUG: refs.c:2083: reference backend is unknown
> > error: git-remote-https died of signal 6
> 
> Thanks for the report.
> 
> I can definitely confirm this with a local Git 2.44.0 built out of my
> working tree.  It seems to trigger as long as there's a `path` entry
> whether the path exists or not.  It _doesn't_ seem to trigger with a
> `gitdir` check, but does trigger for `onbranch`.  v2.43.0 is not
> affected.
> 
> I do definitely think this is a bug.  First of all, we should not
> trigger BUG conditions, even if the user has done something naughty, so
> we should fix it for that reason.  Second of all, this seems like a
> completely reasonable thing to want to do, and considering it triggers
> for existing files, and that it worked just fine in v2.43.0, I don't see
> a reason we shouldn't have this work.
> 
> A bisection[0] leads us to 0fcc285c5e ("refs: refactor logic to look up
> storage backends", 2023-12-29).  I've CCed the author of that commit,
> who hopefully can provide some more helpful context.
> 
> I have some guesses about what's going on here, but I haven't poked
> further into the situation, so I'll refrain from speculating for now.
> 
> [0] git bisect run sh -c 'make -j12 && cd $TMPDIR && rm -fr no-OS && PATH="$HOME/checkouts/git/bin-wrappers:$PATH" git clone https://github.com/analogdevicesinc/no-OS.git; RET=$?; [ "$RET" -eq 128 ] && RET=1; exit $RET'

Thanks for bisecting! My first hunch would've been that it's caused by
the change that changed when we initialize the refdb. I would have thus
hoped for 199f44cb2e (builtin/clone: allow remote helpers to detect
repo, 2024-02-27) to have fixed the issue. But the bisected commit
points into a different direction, so I'd be surprised if that was it.

Anyway, I didn't yet have the time to investigate this issue further,
and am currently a bit short on time. I will have a deeper look next
week at the latest.

Patrick

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  parent reply	other threads:[~2024-03-11 23:30 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-08 19:25 [BUG] cannot git clone with includeif onbranch Angelo Dureghello
2024-03-08 20:10 ` brian m. carlson
2024-03-08 20:27   ` Angelo Dureghello
2024-03-08 21:20   ` rsbecker
2024-03-11 23:30   ` Patrick Steinhardt [this message]
2024-03-12 12:35 ` [PATCH] t5601: exercise clones with "includeIf.*.onbranch" Patrick Steinhardt
2024-03-12 20:38   ` Junio C Hamano
2024-03-22  2:01     ` Patrick Steinhardt
2024-03-22  2:11       ` Junio C Hamano
2024-03-22  2:15       ` Patrick Steinhardt

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=Ze-UBgQtoWK8Rk4F@tanuki \
    --to=ps@pks.im \
    --cc=angelo@kernel-space.org \
    --cc=git@vger.kernel.org \
    --cc=sandals@crustytoothpaste.net \
    /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).