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

t7005-editor.sh failure

From
Alexander Pyhalov <apyhalov@gmail.com>
Date
Sep 26, 2018, 06:52 UTC
Message-ID
<CALOYryFX4PPR+=1L+sjEqPsdmNh_+vNxGf0wwuAgoYzau=GShw@mail.gmail.com>

On updating git to 2.19 we've suddenly got t7005-editor.sh test failures. The issue seems to be that generated "e space.sh" file can't handle files with spaces. Instead of 'echo space >$1' it should be 'echo space > "$1"' or git editor fails when gets file with spaces in name.

The patch is simple:
-- 
Best regards,
Alexander Pyhalov,
system administrator of Southern Federal University IT department


--- git-2.19.0/t/t7005-editor.sh.~1~	Mon Sep 10 21:39:13 2018
+++ git-2.19.0/t/t7005-editor.sh	Wed Sep 26 09:41:30 2018
@@ -112,7 +112,7 @@
 done
 
 test_expect_success 'editor with a space' '
-	echo "echo space >\$1" >"e space.sh" &&
+	echo "echo space > \"\$1\"" > "e space.sh" &&
 	chmod a+x "e space.sh" &&
 	GIT_EDITOR="./e\ space.sh" git commit --amend &&
 	test space = "$(git show -s --pretty=format:%s)"
Next: Martin Ågren
Message 1 of 15 in “t7005-editor.sh failure”
  1. Alexander PyhalovSep 26, 2018
  2. Martin ÅgrenSep 26, 2018
  3. Alexander PyhalovSep 26, 2018
  4. Martin ÅgrenSep 26, 2018
  5. Alexander PyhalovSep 26, 2018
  6. Eric SunshineSep 26, 2018
  7. Martin ÅgrenSep 26, 2018
  8. SZEDER GáborSep 26, 2018
  9. t7005-editor: quote filename to fix whitespace-issueMartin Ågren, Sep 26, 2018
  10. Taylor BlauSep 26, 2018
  11. Jeff KingSep 26, 2018
  12. Junio C HamanoSep 26, 2018
  13. Junio C HamanoSep 26, 2018
  14. Andrei RybakSep 26, 2018
  15. SZEDER GáborSep 27, 2018

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.