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

Re: Repository cloned using SSH does not respect bare repository initial branch

From
SSheik <sahibzone@gmail.com>
Date
Oct 30, 2023, 15:24 UTC
Message-ID
<b310e254-f6d3-4715-b042-341bf5a98bbc@gmail.com>
In-Reply-To
<20231030093605.GE84866@coredump.intra.peff.net>

Server version is same as client (v2.42.0) as I ran these commands all on the same machine.

Test on ssh server:
$ git -v --build-options
#Output

git version 2.42.0 cpu: x86_64 no commit associated with this build sizeof-long: 8 sizeof-size_t: 8 shell-path: /bin/sh

Thanks
Sheik
On 30/10/23 20:36, Jeff King wrote:
Show 20 quoted lines
> On Thu, Oct 26, 2023 at 07:36:36AM +1100, Sheik wrote:
>
>> Repository cloned using SSH does not use the branch configured in the bare
>> repository however repository cloned using filesystem does as expected.
>> Shouldn't they both behave the same?
> What version of Git is running on the ssh server?
>
> Your example seems to show that the parent repository has an unborn
> branch (i.e., HEAD points to "refs/heads/test", but there are no commits
> yet). I think the server-side bits you need for that to work showed up
> in 59e1205d16 (ls-refs: report unborn targets of symrefs, 2021-02-05),
> which is in v2.31.
>
> So even though your client seems to be v2.42 (from the output you gave),
> if the server is older it may not be sending sufficient information.
> There were also some other fixes on top of that, but I _think_ they were
> all client-side (so your v2.42 clone command should be doing the right
> thing).
>
> -Peff
Previous: Jeff KingNext: Jeff King
Message 3 of 7 in “Repository cloned using SSH does not respect bare repository initial branch”
  1. SheikOct 25, 2023
  2. Jeff KingOct 30, 2023
  3. SheikOct 30, 2023
  4. Jeff KingOct 30, 2023
  5. SheikOct 30, 2023
  6. SheikOct 31, 2023
  7. SheikOct 30, 2023

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.