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

Re: bug in t3700-add.sh?

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 3, 2007, 21:29 UTC
Message-ID
<7v643wmhmg.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<fcaeb9bf0708031351g5e585a4bj849fbf2ec3720a18@mail.gmail.com>
"Nguyen Thai Ngoc Duy" <pclouds@gmail.com> writes:
> Running test 17, I got this output:
Gaah.  Those $s seem completely bogus.

This test only cares to see if the blob type is retained (it does "git add" to the path later to throw away the unmergedness and data at higher stage prepared by this step), so it really does not matter what is fed to hash-object. But it should be hashing a file whose contents is '1' and a symlink to '2'.

diff --git a/t/t3700-add.sh b/t/t3700-add.sh
index b52fde8..213e924 100755
--- a/t/t3700-add.sh
+++ b/t/t3700-add.sh
@@ -131,8 +131,8 @@ test_expect_success 'git add with filemode=0, symlinks=0 prefers stage 2 over st
 	(
 		echo "100644 $(git hash-object -w stage1) 1	file"
 		echo "100755 $(git hash-object -w stage2) 2	file"
-		echo "100644 $(printf $s | git hash-object -w -t blob --stdin) 1	symlink"
-		echo "120000 $(printf $s | git hash-object -w -t blob --stdin) 2	symlink"
+		echo "100644 $(printf 1 | git hash-object -w -t blob --stdin) 1	symlink"
+		echo "120000 $(printf 2 | git hash-object -w -t blob --stdin) 2	symlink"
 	) | git update-index --index-info &&
 	git config core.filemode 0 &&
 	git config core.symlinks 0 &&
Previous: Junio C Hamano
Message 3 of 3 in “bug in t3700-add.sh?”
  1. Nguyen Thai Ngoc DuyAug 3, 2007
  2. Junio C HamanoAug 3, 2007
  3. Junio C HamanoAug 3, 2007

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.