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

Re: Possible regression in master? (submodules without a "master" branch)

From
Johan Herland <johan@herland.net>
Date
Mar 27, 2014, 23:27 UTC
Message-ID
<CALKQrgeLY2ziW2jOoWgNcsBR6EE4rnmkYN6Z1iiGXDtiECE8og@mail.gmail.com>
In-Reply-To
<5334AC59.7010605@web.de>
On Thu, Mar 27, 2014 at 11:55 PM, Jens Lehmann <Jens.Lehmann@web.de> wrote:
Show 26 quoted lines
> Am 27.03.2014 19:30, schrieb Junio C Hamano:
>>  - For a repository that does not have that "branch" thing
>>    configured, the doc says that it will default to 'master'.
>>
>>    I do not think this was brought up during the review, but is it a
>>    sensible default if the project does not even have that branch?
>>
>>    What are viable alternatives?
>>
>>    - use 'master' and fail just the way Johan saw?
>>
>>    - use any random branch that happens to be at the same commit as
>>      what is being checked out?
>>
>>    - use the branch "clone" for the submodule repository saw the
>>      upstream was pointing at with its HEAD?
>>
>>    - something else?
>
> Good question. Me thinks that when a superproject doesn't have
> 'branch' configured and does set 'update' to something other than
> 'checkout' for a submodule it should better make sure 'master'
> is a valid branch in there. Everything else sounds like a
> misconfiguration on the superproject's part that warrants an
> error. But I may be wrong here as I only use 'checkout' together
> with a detached HEADs myself. Comments welcome.

I believe unset 'branch' and 'update' != 'checkout' is somewhat analogous to unset branch.<name>.merge while pulling. I.e. "you have told me to merge/rebase, but you have not told me against which branch, therefore error out".

...Johan
-- 
Johan Herland, <johan@herland.net>
www.herland.net
Previous: Jens LehmannNext: W. Trevor King
Message 7 of 29 in “Possible regression in master? (submodules without a "master" branch)”
  1. Johan HerlandMar 27, 2014
  2. W. Trevor KingMar 27, 2014
  3. W. Trevor KingMar 27, 2014
  4. Jens LehmannMar 27, 2014
  5. Junio C HamanoMar 27, 2014
  6. Jens LehmannMar 27, 2014
  7. Johan HerlandMar 27, 2014
  8. W. Trevor KingMar 28, 2014
  9. Junio C HamanoMar 27, 2014
  10. Jens LehmannMar 27, 2014
  11. W. Trevor KingMar 27, 2014
  12. Junio C HamanoMar 27, 2014
  13. Heiko VoigtMar 27, 2014
  14. Jens LehmannMar 27, 2014
  15. Johan HerlandMar 27, 2014
  16. W. Trevor KingMar 28, 2014
  17. [RFC] submodule: change submodule.<name>.branch default from master to HEADW. Trevor King, Mar 28, 2014
  18. Eric SunshineMar 28, 2014
  19. W. Trevor KingMar 28, 2014
  20. W. Trevor KingMar 28, 2014
  21. Jens LehmannMar 28, 2014
  22. W. Trevor KingMar 28, 2014
  23. Jens LehmannMar 31, 2014
  24. Junio C HamanoMar 28, 2014
  25. Jens LehmannMar 31, 2014
  26. W. Trevor KingMar 31, 2014
  27. Junio C HamanoMar 31, 2014
  28. submodule.<path>.branch vs. submodule.<name>.branch (was: Possible regression in master? (submodules without a "master" branch).W. Trevor King, Mar 27, 2014
  29. Junio C HamanoMar 27, 2014

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.