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

Re: [PATCHv2 2/6] submodule test invocation: only pass additional arguments

From
Junio C Hamano <gitster@pobox.com>
Date
May 23, 2017, 06:26 UTC
Message-ID
<xmqqefvgks0g.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<20170522194806.13568-3-sbeller@google.com>
Stefan Beller <sbeller@google.com> writes:
Show 15 quoted lines
> diff --git a/t/t2013-checkout-submodule.sh b/t/t2013-checkout-submodule.sh
> index e8f70b806f..2672f104cf 100755
> --- a/t/t2013-checkout-submodule.sh
> +++ b/t/t2013-checkout-submodule.sh
> @@ -65,9 +65,9 @@ test_expect_success '"checkout <submodule>" honors submodule.*.ignore from .git/
>  
>  KNOWN_FAILURE_DIRECTORY_SUBMODULE_CONFLICTS=1
>  KNOWN_FAILURE_SUBMODULE_RECURSIVE_NESTED=1
> -test_submodule_switch_recursing "git checkout --recurse-submodules"
> +test_submodule_switch_recursing "checkout"
>  
> -test_submodule_forced_switch_recursing "git checkout -f --recurse-submodules"
> +test_submodule_forced_switch_recursing "checkout -f"
>  
>  test_submodule_switch "git checkout"
Doesn't the above look crazy to you?  

It is hostile to other people (and those who need to make merges) who have to work with test_submodule_switch_recursing that older one used to take the full command but its definition suddenly changes so that the caller now must omit the leading "git". Even worse, another helper with a similar-sounding name, test_submodule_switch, still must be called with the leading "git".

The same comment applies to the one we can see below.
Show 15 quoted lines
> diff --git a/t/t7112-reset-submodule.sh b/t/t7112-reset-submodule.sh
> index f86ccdf215..a000304221 100755
> --- a/t/t7112-reset-submodule.sh
> +++ b/t/t7112-reset-submodule.sh
> @@ -9,9 +9,9 @@ KNOWN_FAILURE_SUBMODULE_RECURSIVE_NESTED=1
>  KNOWN_FAILURE_DIRECTORY_SUBMODULE_CONFLICTS=1
>  KNOWN_FAILURE_SUBMODULE_OVERWRITE_IGNORED_UNTRACKED=1
>  
> -test_submodule_switch_recursing "git reset --recurse-submodules --keep"
> +test_submodule_switch_recursing "reset --keep"
>  
> -test_submodule_forced_switch_recursing "git reset --hard --recurse-submodules"
> +test_submodule_forced_switch_recursing "reset --hard"
>  
>  test_submodule_switch "git reset --keep"
Previous: Stefan BellerNext: Stefan Beller
Message 4 of 11 in “[PATCHv2 0/6] Add option to recurse into submodules”
  1. Stefan BellerMay 22, 2017
  2. 3/6 Introduce submodule.recurse option for worktree manipulatorsStefan Beller, May 22, 2017
  3. 2/6 submodule test invocation: only pass additional argumentsStefan Beller, May 22, 2017
  4. Junio C HamanoMay 23, 2017
  5. Stefan BellerMay 23, 2017
  6. 5/6 builtin/grep.c: respect 'submodule.recurse' optionStefan Beller, May 22, 2017
  7. 4/6 builtin/fetch.c: respect 'submodule.recurse' optionStefan Beller, May 22, 2017
  8. 6/6 builtin/push.c: respect 'submodule.recurse' optionStefan Beller, May 22, 2017
  9. 1/6 submodule.c: add has_submodules to check if we have any submodulesStefan Beller, May 22, 2017
  10. Brandon WilliamsMay 23, 2017
  11. Stefan BellerMay 23, 2017

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.