From: Junio C Hamano Date: Tue, 06 Dec 2011 23:58:35 GMT Subject: Re: [PATCHv2 06/13] credential: apply helper config Message-ID: <7vsjkxckwk.fsf@alter.siamese.dyndns.org> In-Reply-To: <20111206062247.GF29233@sigill.intra.peff.net> Jeff King writes: > diff --git a/t/t0300-credentials.sh b/t/t0300-credentials.sh > index 81a455f..e3f61f4 100755 > --- a/t/t0300-credentials.sh > +++ b/t/t0300-credentials.sh > @@ -192,4 +192,46 @@ test_expect_success 'internal getpass does not ask for known username' ' > EOF > ' > > +HELPER="f() { > + cat >/dev/null > + echo username=foo > + echo password=bar > + }; f" > +test_expect_success 'respect configured credentials' ' > + test_config credential.helper "$HELPER" && > + check fill <<-\EOF > + -- > + username=foo > + password=bar > + -- > + EOF > +' Hmm, why do I get ask-ass-{username,password} from this one? > +test_expect_success 'match configured credential' ' > + test_config credential.https://example.com.helper "$HELPER" && > + check fill <<-\EOF > + protocol=https > + host=example.com > + path=repo.git > + -- > + username=foo > + password=bar > + -- > + EOF > +' And this one, too...