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

Re: [PATCH v2] clone: Allow combining --bare and --origin

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 6, 2021, 22:13 UTC
Message-ID
<xmqqh7g2gr1s.fsf@gitster.g>
In-Reply-To
<YQ2aXpfzyOOUFhQk@isis.sigpipe.cz>
Roman Neuhauser <rn+git@sigpipe.cz> writes:
Show 9 quoted lines
>> But we'd end up treating them the same.  And something like
>> remote.originName would help that.  Otherwise, we'd end up sending
>> this message:
>> 
>>     Even if we give "--bare --origin yourfavouritename" to you now,
>>     unlike how 'origin' is treated in the default case, in the
>>     resulting repository, 'yourfavouritename' is not special at all.
>
> Isn't that the case in non-bare repositories as well?

You have branches that are checked out. The first branch that you'd presumably be using as the primary (traditionally called 'master') knows that the nickname used to call the remote it integrates with as the value of branch.master.remote

In a bare repository, there is no such clue.
> Can't they just continue doing what they've been doing so far,
> that is leave it at "origin"?  I'm not sure this would be my concern
> as a user of this feature.

That answer can be thrown back at you. You can leave it at "origin" when using "--bare" ;-).

The posted patch is a good first step to allow both options to be used at the same time. Without the first step, these two options cannot coexist.

But I am also saying that the first step alone is an inadequate solution that goes only halfway. If you can get yourfavouritename, while others cannot use their favourite names, that is not a satisfying solution.

Previous: Roman NeuhauserNext: Roman Neuhauser
Message 9 of 13 in “clone: Remove constraint on --bare and --origin”
  1. clone: Remove constraint on --bare and --originØystein Walle, Aug 1, 2021
  2. Junio C HamanoAug 2, 2021
  3. Ævar Arnfjörð BjarmasonAug 2, 2021
  4. clone: Allow combining --bare and --originØystein Walle, Aug 2, 2021
  5. Junio C HamanoAug 3, 2021
  6. Øystein WalleAug 4, 2021
  7. Junio C HamanoAug 4, 2021
  8. Roman NeuhauserAug 6, 2021
  9. Junio C HamanoAug 6, 2021
  10. Roman NeuhauserAug 7, 2021
  11. Re* [PATCH v2] clone: Allow combining --bare and --originJunio C Hamano, Aug 7, 2021
  12. Roman NeuhauserAug 8, 2021
  13. Junio C HamanoAug 4, 2021

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.