Re: [PATCH v6 7/7] git: submodule honor -c credential.* from command line

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

 



On Mon, Feb 29, 2016 at 3:39 PM, Stefan Beller <sbeller@xxxxxxxxxx> wrote:
> On Mon, Feb 29, 2016 at 2:58 PM, Jacob Keller <jacob.e.keller@xxxxxxxxx> wrote:
>>
>> +test_expect_success 'cmdline credential config passes into submodules' '
>> +       git init super &&
>> +       set_askpass user@host pass@host &&
>
> I wonder why we use pass@host as a password, it seems confusing to me.
> p@ssword would have worked if we wanted to test a password containing an @,
> pass@host doesn't quite fit my mental model of how passwords work.
> No need to change anything, better be consistent with the rest of the tests.
>

I am not sure, but I don't think it particularly matters what we use.
Most of this is pretty much copied as suggested by Peff.

>
>> +       (
>> +               cd super &&
>> +               git submodule add "$HTTPD_URL/auth/dumb/repo.git" sub &&
>> +               git commit -m "add submodule"
>> +       ) &&
>> +       set_askpass wrong pass@host &&
>> +       test_must_fail git clone --recursive super super-clone &&
>> +       rm -rf super-clone &&
>> +       set_askpass wrong pass@host &&
>
> Why set set_askpass a second time here?

Interesingly, it fails unless I add this line with:

Submodule path 'sub': checked out '678c534310f3cd5727f8e066cba0cd420bd7948e'
--- "/home/jekeller/git/git/t/trash
directory.t5550-http-fetch-dumb/askpass-expect"     2016-02-29
23:43:35.724179569 +0000
+++ "/home/jekeller/git/git/t/trash
directory.t5550-http-fetch-dumb/askpass-query"      2016-02-29
23:43:35.681179568 +0000
@@ -1 +1,3 @@
+askpass: Username for 'http://127.0.0.1:5550':
+askpass: Password for 'http://wrong@127.0.0.1:5550':
 askpass: Password for 'http://user@host@127.0.0.1:5550':
not ok 13 - cmdline credential config passes into submodules
#
#               git init super &&
#               set_askpass user@host pass@host &&
#               (
#                       cd super &&
#                       git submodule add "$HTTPD_URL/auth/dumb/repo.git" sub &&
#                       git commit -m "add submodule"
#               ) &&
#               set_askpass wrong pass@host &&
#               test_must_fail git clone --recursive super super-clone &&
#               rm -rf super-clone &&
#               git -c "credential.$HTTP_URL.username=user@host" \
#                       clone --recursive super super-clone &&
#               expect_askpass pass user@host
#

I really don't understand why adding the extra askpass setting fixes
this? Possibly because the query and expect files are appended to? Or
something else subtle going on?

Basically: without this, the expect vs the query don't match. With it,
they do. I don't understand the reasoning why.

>
> Thanks for this test!
> Stefan

Jeff King suggested it, originally.

Thanks,
Jake
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



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