From: Dave Borowitz <dborowitz@google.com>
To: Brian Gernhardt <brian@gernhardtsoftware.com>
Cc: Git List <git@vger.kernel.org>, Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH 3/3] t5551: Remove header from curl cookie file
Date: Mon, 5 Aug 2013 17:29:03 -0700 [thread overview]
Message-ID: <CAD0k6qS7_W6iG5zCOLiEtxdMV3ujAApgDykM_fnL0qiROoUv0A@mail.gmail.com> (raw)
In-Reply-To: <1375718364-13824-4-git-send-email-brian@gernhardtsoftware.com>
On Mon, Aug 5, 2013 at 8:59 AM, Brian Gernhardt
<brian@gernhardtsoftware.com> wrote:
>
> The URL included in the header appears to vary from curl version to
> curl version. Since we only care about the final few lines, only test
> them. However, make sure the blank line after the header is still
> included to make sure there are no extra cookie lines.
>
> Signed-off-by: Brian Gernhardt <brian@gernhardtsoftware.com>
> ---
>
> I suppose a sed invocation to strip out the URL or comments might be better,
> but this seemed simpler.
>
> t/t5551-http-fetch.sh | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/t/t5551-http-fetch.sh b/t/t5551-http-fetch.sh
> index 287d22b..8196af1 100755
> --- a/t/t5551-http-fetch.sh
> +++ b/t/t5551-http-fetch.sh
> @@ -191,9 +191,6 @@ cat >cookies.txt <<EOF
> 127.0.0.1 FALSE /smart_cookies/ FALSE 0 othername othervalue
> EOF
> cat >expect_cookies.txt <<EOF
> -# Netscape HTTP Cookie File
> -# http://curl.haxx.se/docs/http-cookies.html
> -# This file was generated by libcurl! Edit at your own risk.
>
> 127.0.0.1 FALSE /smart_cookies/ FALSE 0 othername othervalue
> 127.0.0.1 FALSE /smart_cookies/repo.git/info/ FALSE 0 name value
> @@ -202,7 +199,8 @@ test_expect_success 'cookies stored in http.cookiefile when http.savecookies set
> git config http.cookiefile cookies.txt &&
> git config http.savecookies true &&
> git ls-remote $HTTPD_URL/smart_cookies/repo.git master &&
> - test_cmp expect_cookies.txt cookies.txt
> + tail -3 cookies.txt > cookies_tail.txt
Would it make more sense to ignore comments entirely? I.e. instead of
taking the tail, pipe through sed 's/#.*//'.
Thanks for catching this by the way; you can probably guess that I
only checked with a single curl version.
>
> + test_cmp expect_cookies.txt cookies_tail.txt
> '
>
> test -n "$GIT_TEST_LONG" && test_set_prereq EXPENSIVE
> --
> 1.8.4.rc1.384.g0976a17.dirty
>
prev parent reply other threads:[~2013-08-06 0:29 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-05 15:59 [PATCH 0/3] Fixes for OS X Brian Gernhardt
2013-08-05 15:59 ` [PATCH 1/3] Makefile: Fix APPLE_COMMON_CRYPTO with BLK_SHA1 Brian Gernhardt
2013-08-05 16:16 ` Jeremy Huddleston Sequoia
2013-08-05 17:52 ` Junio C Hamano
2013-08-06 11:25 ` David Aguilar
2013-08-06 17:24 ` Junio C Hamano
2013-08-05 15:59 ` [PATCH 2/3] OS X: Fix redeclaration of die warning Brian Gernhardt
2013-08-05 16:17 ` Jeremy Huddleston Sequoia
2013-08-05 18:00 ` Junio C Hamano
2013-08-06 11:30 ` David Aguilar
2013-08-05 15:59 ` [PATCH 3/3] t5551: Remove header from curl cookie file Brian Gernhardt
2013-08-06 0:29 ` Dave Borowitz [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAD0k6qS7_W6iG5zCOLiEtxdMV3ujAApgDykM_fnL0qiROoUv0A@mail.gmail.com \
--to=dborowitz@google.com \
--cc=brian@gernhardtsoftware.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).