Re: [BUG] submodule config does not apply to upper case submodules?

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

 



On Wed, Feb 15, 2017 at 3:17 AM, Lars Schneider
<larsxschneider@xxxxxxxxx> wrote:
> It looks like as if submodule configs ("submodule.*") for submodules
> with upper case names are ignored. The test cases shows that skipping
> a submodule during a recursive clone seems not to work.
>
> Signed-off-by: Lars Schneider <larsxschneider@xxxxxxxxx>
> ---
>
> I observed the bug on Windows, macOS, and Linux and at least on
> v2.11.0 and v2.11.1:
> https://travis-ci.org/larsxschneider/git/builds/201828672

Thanks for the bug report.

>
> Right now I have no time to fix it but I might be able to look into it
> next week (if no one else tackles it before that).

I might look into it before next week.

> Notes:
>     Base Commit: 3b9e3c2ced (v2.11.1)
>     Diff on Web: https://github.com/larsxschneider/git/commit/a122feaf9f
>     Checkout:    git fetch https://github.com/larsxschneider/git submodule/uppercase-bug-v1 && git checkout a122feaf9f

I like these notes, though base commit is duplicate with below.


> +test_expect_success 'submodule config does not apply to upper case submodules' '
...
> +               git submodule add ../UPPERSUB &&
> +               git commit -m "add submodules"
> +       ) &&

up to here we only do "setup"-sy stuff.
("setup being a trigger word that you cannot omit
the test for subsequent tests to work)
So maybe have
    test_expect_success 'setup submodule with lower and uppercase' '
    ...
    '
    test_expect_success 'just the clone' '
    ...
    '
    test_expect_success ' check for lower case'
        grep -e "Skipping submodule *lowersub*" err
    '
    test_expect_failure ' check for upper case'
        grep ...
    '
> +       git -c submodule.lowersub.update=none clone --recursive super clone-success 2>&1 |
> +               grep "Skipping submodule" &&
> +       git -c submodule.UPPERSUB.update=none clone --recursive super clone-failure 2>&1 |
> +               grep "Skipping submodule"

I'd rather give both options in one invocation and then grep from a file, e.g.

    git -c submodule.lowersub.update=none -c submodule.UPPERSUB.update=none \
        clone --recursive super super_clone 2>err 1>out &&
    grep -e "Skipping submodule *lowersub*" err

> +'
>
>  test_done
>

> base-commit: 3b9e3c2cede15057af3ff8076c45ad5f33829436

Heh, I see what you did here. :)

> --
> 2.11.0
>



[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]