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

Re: [PATCH] t3411: Fix test 1 for case-insensitive file systems

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 29, 2009, 17:19 UTC
Message-ID
<7vocxqf2sf.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<1233244816-67565-1-git-send-email-benji@silverinsanity.com>
Brian Gernhardt <benji@silverinsanity.com> writes:
Show 23 quoted lines
> The call to "git reset --hard B1" failed on case-insensitive file
> systems (such as the default settings for HFS+) because there was both
> a tag "B1" and a file "b1".  Adding "--" to the command makes it
> clear that we mean commit B1.
>
> Signed-off-by: Brian Gernhardt <benji@silverinsanity.com>
> ---
>  t/t3411-rebase-preserve-around-merges.sh |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/t/t3411-rebase-preserve-around-merges.sh b/t/t3411-rebase-preserve-around-merges.sh
> index 6533505..e544451 100755
> --- a/t/t3411-rebase-preserve-around-merges.sh
> +++ b/t/t3411-rebase-preserve-around-merges.sh
> @@ -24,7 +24,7 @@ test_expect_success 'setup' '
>  	test_commit A1 &&
>  	test_commit B1 &&
>  	test_commit C1 &&
> -	git reset --hard B1 &&
> +	git reset --hard B1 -- &&
>  	test_commit D1 &&
>  	test_merge E1 C1 &&
>  	test_commit F1

It is not just B1 that is ambiguous, even though that is the only ambiguous one this particular test uses.

If we really wanted to care about case-folding file systems, shouldn't we make test_commit shell function a bit more than the downcasing? How about this patch instead?

 t/test-lib.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git c/t/test-lib.sh w/t/test-lib.sh
index c1839f7..8066c25 100644
--- c/t/test-lib.sh
+++ w/t/test-lib.sh
@@ -201,7 +201,7 @@ test_tick () {
 # Both <file> and <contents> default to <message>.
 
 test_commit () {
-	file=${2:-$(echo "$1" | tr 'A-Z' 'a-z')}
+	file=${2:-$(echo "$1" | tr 'A-Z' 'a-z').t}
 	echo "${3-$1}" > "$file" &&
 	git add "$file" &&
 	test_tick &&
Previous: Johannes SchindelinNext: Johannes Schindelin
Message 3 of 17 in “t3411: Fix test 1 for case-insensitive file systems”
  1. t3411: Fix test 1 for case-insensitive file systemsBrian Gernhardt, Jan 29, 2009
  2. Johannes SchindelinJan 29, 2009
  3. Junio C HamanoJan 29, 2009
  4. Johannes SchindelinJan 29, 2009
  5. Brian GernhardtJan 29, 2009
  6. Brian GernhardtFeb 3, 2009
  7. Johannes SchindelinFeb 3, 2009
  8. Brian GernhardtFeb 3, 2009
  9. Johannes SchindelinFeb 3, 2009
  10. Brian GernhardtFeb 3, 2009
  11. Johannes SchindelinFeb 3, 2009
  12. Brian GernhardtFeb 3, 2009
  13. Junio C HamanoFeb 3, 2009
  14. Brian GernhardtFeb 3, 2009
  15. Johannes SchindelinFeb 3, 2009
  16. Johannes SchindelinFeb 3, 2009
  17. Junio C HamanoFeb 4, 2009

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.