Hi Peff,

On Wed, 27 Apr 2016, Jeff King wrote:

> On Wed, Apr 27, 2016 at 08:31:50AM +0200, Johannes Schindelin wrote:
> 
> > > +test_expect_success 'custom http headers' '
> > > + test_must_fail git fetch "$HTTPD_URL/smart_headers/repo.git" &&
> > > + git -c http.extraheader="x-magic-one: abra" \
> > > +     -c http.extraheader="x-magic-two: cadabra" \
> > > +     fetch "$HTTPD_URL/smart_headers/repo.git"
> > > +'
> > > +
> > >  stop_httpd
> > >  test_done
> > 
> > That's pretty easy.
> > 
> > After sleeping over the issue, I realized, though, that the test can use
> > the very same method *I* used to verify that the headers are sent: using
> > GIT_CURL_VERBOSE.
> > 
> > I hope you do not mind that I used this method instead.
> 
> TBH, I think mine is a little more robust, but I don't overly care
> either way.

Yes, you are correct, I only test that the header is sent twice, assuming
that exactly two HTTP requests are sent. Your test verifies that whatever
request is sent *requires* the header.

Will send out v4 with your test instead of mine in a few moments.

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

Reply via email to