git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 3/3] t5551: Remove header from curl cookie file

From
Brian Gernhardt <brian@gernhardtsoftware.com>
Date
Aug 5, 2013, 15:59 UTC
Message-ID
<1375718364-13824-4-git-send-email-brian@gernhardtsoftware.com>
In-Reply-To
<1375718364-13824-1-git-send-email-brian@gernhardtsoftware.com>

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
+	test_cmp expect_cookies.txt cookies_tail.txt
 '
 
 test -n "$GIT_TEST_LONG" && test_set_prereq EXPENSIVE
-- 
1.8.4.rc1.384.g0976a17.dirty
Previous: David AguilarNext: Dave Borowitz
Message 11 of 12 in “Fixes for OS X”
  1. 0/3 Fixes for OS XBrian Gernhardt, Aug 5, 2013
  2. 1/3 Makefile: Fix APPLE_COMMON_CRYPTO with BLK_SHA1Brian Gernhardt, Aug 5, 2013
  3. Jeremy Huddleston SequoiaAug 5, 2013
  4. Junio C HamanoAug 5, 2013
  5. David AguilarAug 6, 2013
  6. Junio C HamanoAug 6, 2013
  7. 2/3 OS X: Fix redeclaration of die warningBrian Gernhardt, Aug 5, 2013
  8. Jeremy Huddleston SequoiaAug 5, 2013
  9. Junio C HamanoAug 5, 2013
  10. David AguilarAug 6, 2013
  11. 3/3 t5551: Remove header from curl cookie fileBrian Gernhardt, Aug 5, 2013
  12. Dave BorowitzAug 6, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.