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

Re: [PATCH] git-submodule.sh: Support 'checkout' as a valid update command

From
Francesco Pretto <ceztko@gmail.com>
Date
Jan 7, 2014, 17:42 UTC
Message-ID
<CALas-igswi9ro=j1r3YJ9wLd2ikp9fa6M-3ZSYQZXKmaTfGOWw@mail.gmail.com>
In-Reply-To
<xmqqlhyrg49c.fsf@gitster.dls.corp.google.com>
2014/1/7 Junio C Hamano <gitster@pobox.com>:
Show 30 quoted lines
> It is not about preference but what we want to convey to the
> readers.  When you start the sentence with "Oh, it already works
> correctly", the readers need to see this sentence finished: "It
> already works, it is handled correctly, but we change the code
> nevertheless because ...?".
>
> Here is my attempt to fill that "because ..." part:
>
>         Subject: git-submodule.sh: 'checkout' is a valid update mode
>
>         'checkout' is documented as one of the valid values for
>         'submodule.<name>.update' variable, and in a repository with
>         the variable set to 'checkout', "git submodule update"
>         command do update using the 'checkout' mode.
>
>         However, it has been an accident that the implementation
>         works this way; any unknown value would trigger the same
>         codepath and update using the 'checkout' mode.
>
>         Tighten the codepath and explicitly list 'checkout' as one
>         of the known update modes, and error out when an unknown
>         update mode is used.
>
>         Also, teach the codepath that initializes the configuration
>         variable from in-tree .gitmodules that 'checkout' is one of
>         the valid values---the code since ac1fbbda (submodule: do
>         not copy unknown update mode from .gitmodules, 2013-12-02)
>         used to treat the value 'checkout' as unknown and mapped it
>         to 'none', which made little sense.
>

I wouldn't be able to explain the change better than your description. Also, I was under the improper assumption that the change was obvious. Thank you very much for the amended patch description.

Cheers, Francesco

Previous: Junio C HamanoNext: Francesco Pretto
Message 5 of 6 in “git-submodule.sh: Support 'checkout' as a valid update command”
  1. git-submodule.sh: Support 'checkout' as a valid update commandFrancesco Pretto, Jan 6, 2014
  2. Junio C HamanoJan 6, 2014
  3. Francesco PrettoJan 7, 2014
  4. Junio C HamanoJan 7, 2014
  5. Francesco PrettoJan 7, 2014
  6. Francesco PrettoJan 7, 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.