Re: [PATCH 02/14] lib-submodule-update.sh: define tests for recursing into submodules

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Feb 15, 2017 at 8:51 AM, Brandon Williams <bmwill@xxxxxxxxxx> wrote:
> On 02/14, Stefan Beller wrote:
>> diff --git a/t/lib-submodule-update.sh b/t/lib-submodule-update.sh
>> index 61c54f2098..7c8c557572 100755
>> --- a/t/lib-submodule-update.sh
>> +++ b/t/lib-submodule-update.sh
>> @@ -4,6 +4,7 @@
>>  # - New submodule (no_submodule => add_sub1)
>>  # - Removed submodule (add_sub1 => remove_sub1)
>>  # - Updated submodule (add_sub1 => modify_sub1)
>> +# - Updated submodule recursively (modify_sub1 => modify_sub1_recursively)
>>  # - Submodule updated to invalid commit (add_sub1 => invalid_sub1)
>>  # - Submodule updated from invalid commit (invalid_sub1 => valid_sub1)
>>  # - Submodule replaced by tracked files in directory (add_sub1 =>
>> @@ -19,8 +20,8 @@
>>  #                    /    ^
>>  #                   /     remove_sub1
>>  #                  /
>> -#       add_sub1  /-------O
>> -#             |  /        ^
>> +#       add_sub1  /-------O---------O
>> +#             |  /        ^         modify_sub1_recursive
>>  #             | /         modify_sub1
>>  #             v/
>>  #      O------O-----------O---------O
>> @@ -73,6 +74,14 @@ create_lib_submodule_repo () {
>>               git add sub1 &&
>>               git commit -m "Modify sub1" &&
>>
>> +             git checkout -b modify_sub1_recursively modify_sub1 &&
>> +             git -C sub1 checkout -b "add_nested_sub" &&
>> +             git -C sub1 submodule add --branch no_submodule ./. sub2 &&
>
> I thought we were trying to avoid './.' when adding submodules?
>

Yes we should; I'll fix that in a reroll.
It's also still on my long term fix list to remove the ./.
$ git grep 'add \./\.'
lib-submodule-update.sh:                git submodule add ./. sub1 &&
t7001-mv.sh:    git submodule add ./. sub &&
t7001-mv.sh:    git submodule add ./. deep/directory/hierarchy/sub &&
t7507-commit-verbose.sh:        git submodule add ./. sub &&
t7800-difftool.sh:      git submodule add ./. submod/ule &&



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]