git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [BUG] cannot git clone with includeif onbranch

From
ADAngelo Dureghello <angelo@kernel-space.org>
Date
Mar 8, 2024, 20:27 UTC
Message-ID
<d5f9235a-aa27-dc82-8191-c3e4b73ebce9@kernel-space.org>
In-Reply-To
<Zetw0I0NHgABR_PX@tapette.crustytoothpaste.net>
Hi Brian,
On 08/03/24 9:10 PM, brian m. carlson wrote:
Show 48 quoted lines
> 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 a lot.

Actually i can work with git clone git@github.com:.. that works, issue is only on http.

Regards, and if i can help, welcome. angelo

Previous: brian m. carlsonNext: rsbecker@nexbridge.com
Message 3 of 10 in “[BUG] cannot git clone with includeif onbranch”
  1. Angelo DureghelloMar 8, 2024
  2. brian m. carlsonMar 8, 2024
  3. Angelo DureghelloMar 8, 2024
  4. rsbecker@nexbridge.comMar 8, 2024
  5. Patrick SteinhardtMar 11, 2024
  6. t5601: exercise clones with "includeIf.*.onbranch"Patrick Steinhardt, Mar 12, 2024
  7. Junio C HamanoMar 12, 2024
  8. Patrick SteinhardtMar 22, 2024
  9. Junio C HamanoMar 22, 2024
  10. Patrick SteinhardtMar 22, 2024

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.