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

Re: [PATCH 4/7] submodule update --init: correct path handling in recursive submodules

From
Stefan Beller <sbeller@google.com>
Date
Mar 29, 2016, 19:49 UTC
Message-ID
<CAGZ79kZZoxBsAfsTohrLqf2f01fmbjK2rrOG5vQ6ShT-zOjeJw@mail.gmail.com>
In-Reply-To
<xmqqbn5xxe25.fsf@gitster.mtv.corp.google.com>
On Tue, Mar 29, 2016 at 12:46 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 15 quoted lines
> Stefan Beller <sbeller@google.com> writes:
>
>> This fixes the test introduced by the parent commit.
>>
>> Signed-off-by: Stefan Beller <sbeller@google.com>
>> ---
>
> The first hunk in this patch touches lines that goes away with
> d5bc3cd2 (submodule: port init from shell to C, 2016-03-14) on
> your sb/submodule-init topic and the whole block is replaced
> by a call to "submodule--helper init".
>
> I'll drop the first hunk when merging this series to 'pu' for now;
> hopefully you did not inherit the bug when rewriting the part into
> "submodule--helper init".

After examining this patch more closely for a better commit message, the second hunk also goes away, i.e. only the test will remain.

Maybe I can roll this series on top of origin/sb/submodule-init, to avoid confusion.

Show 44 quoted lines
>
> Thanks.
>
>>  git-submodule.sh            | 5 +++--
>>  t/t7406-submodule-update.sh | 2 +-
>>  2 files changed, 4 insertions(+), 3 deletions(-)
>>
>> diff --git a/git-submodule.sh b/git-submodule.sh
>> index 2838069..a7c8599 100755
>> --- a/git-submodule.sh
>> +++ b/git-submodule.sh
>> @@ -474,7 +474,7 @@ cmd_init()
>>               die_if_unmatched "$mode"
>>               name=$(git submodule--helper name "$sm_path") || exit
>>
>> -             displaypath=$(relative_path "$sm_path")
>> +             displaypath=$(relative_path "$prefix$sm_path")
>>
>>               # Copy url setting when it is not set yet
>>               if test -z "$(git config "submodule.$name.url")"
>> @@ -826,8 +826,9 @@ Maybe you want to use 'update --init'?")"
>>               if test -n "$recursive"
>>               then
>>                       (
>> -                             prefix="$prefix$sm_path/"
>> +                             prefix="$(relative_path $prefix$sm_path)/"
>>                               clear_local_git_env
>> +                             wt_prefix=
>>                               cd "$sm_path" &&
>>                               eval cmd_update
>>                       )
>> diff --git a/t/t7406-submodule-update.sh b/t/t7406-submodule-update.sh
>> index c1b9ffa..3bd1552 100755
>> --- a/t/t7406-submodule-update.sh
>> +++ b/t/t7406-submodule-update.sh
>> @@ -118,7 +118,7 @@ Submodule path '../super/rebasing': checked out '${rebasingsha1}'
>>  Submodule path '../super/submodule': checked out '${submodulesha1}'
>>  EOF
>>
>> -test_expect_failure 'submodule update --init --recursive from subdirectory' '
>> +test_expect_success 'submodule update --init --recursive from subdirectory' '
>>       git -C recursivesuper/super reset --hard HEAD^ &&
>>       (cd recursivesuper &&
>>        mkdir tmp &&
Previous: Junio C HamanoNext: Stefan Beller
Message 13 of 17 in “Fix path bugs in submodule commands executed from sub dir [WAS: submodule--helper clone: lose the extra prefix option]”
  1. 0/7 Fix path bugs in submodule commands executed from sub dir [WAS: submodule--helper clone: lose the extra prefix option]Stefan Beller, Mar 28, 2016
  2. 1/7 submodule foreach: test path handling in recursive submodulesStefan Beller, Mar 28, 2016
  3. 2/7 submodule foreach: correct path computation in recursive submodulesStefan Beller, Mar 28, 2016
  4. Junio C HamanoMar 29, 2016
  5. Junio C HamanoMar 29, 2016
  6. Stefan BellerMar 29, 2016
  7. Stefan BellerMar 29, 2016
  8. 3/7 submodule update --init: test path handling in recursive submodulesStefan Beller, Mar 28, 2016
  9. Junio C HamanoMar 29, 2016
  10. 4/7 submodule update --init: correct path handling in recursive submodulesStefan Beller, Mar 28, 2016
  11. Junio C HamanoMar 29, 2016
  12. Junio C HamanoMar 29, 2016
  13. Stefan BellerMar 29, 2016
  14. 5/7 t7407: make expectation as clear as possibleStefan Beller, Mar 28, 2016
  15. Junio C HamanoMar 29, 2016
  16. 6/7 submodule status: test path handling in recursive submodulesStefan Beller, Mar 28, 2016
  17. 7/7 submodule status: fix path handling in recursive submodulesStefan Beller, Mar 28, 2016

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.