Re: [PATCH v2 11/12] submodule: use the correct default for the main branch name

From
Jeff King <hidden>
Date
2020-06-23 21:14:31
Reply to
Johannes Schindelin, 2020-06-23
On Tue, Jun 23, 2020 at 11:03:57PM +0200, Johannes Schindelin wrote:
quoted
[use HEAD instead of master]
This is the route that I am taking.
[...]
This is of course a bit worrisome, as there might actually be users out
there relying on the confusing behavior.

However, I think it is okay to fix this:

- The `git submodule update --remote` command does not strike me as
  awfully common. In fact, I had never heard of it before I worked on this
  here patch.

- Current Git's behavior when running this command is outright confusing,
  unless the remote repository's current branch _is_ `master` (in which
  case the proposed behavior matches the old behavior).

- It is actually easily fixed by setting `submodule.<name>.branch` to
  `master` _iff_ users want to reinstate the old behavior.
Thanks, I agree that this is the best way forward, and that the current
confusing behavior is as likely to be doing the wrong thing as the right
(when it even differs).

-Peff
Thread (101 messages) 101 messages, 16 authors, last reply 2020-07-13
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help