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

Re: [PATCH v3 09/10] Fix tests breaking when checkout path contains shell metacharacters

From
Johannes Sixt <j.sixt@viscovery.net>
Date
May 5, 2008, 08:11 UTC
Message-ID
<481EC127.4070808@viscovery.net>
In-Reply-To
<20080505075759.GA20537@shion.is.fushizen.net>
Bryan Donlan schrieb:
Show 30 quoted lines
> On Mon, May 05, 2008 at 09:04:08AM +0200, Johannes Sixt wrote:
>> Bryan Donlan schrieb:
>>> This fixes the remainder of the issues where the test script itself is at
>>> fault for failing when the git checkout path contains whitespace or other
>>> shell metacharacters.
>> Maybe a note along these lines would be in order:
>>
>> The majority of git svn tests used the idiom
>>
>>   test_expect_success "title" "test script using $svnrepo"
>>
>> These were changed to have the test script in single-quotes:
>>
>>   test_expect_success "title" 'test script using "$svnrepo"'
>>
>> (which makes the patch so large). One consequence of this change is that
>> in the verbose test output the value of $svnrepo (and in some cases other
>> variables, too) is no longer expanded, i.e. previously we saw
>>
>>   * expecting success:
>> 	test script using /path/to/git/t/trash/svnrepo
>>
>> but now it is:
>>
>>   * expecting success:
>> 	test script using "$svnrepo"
> 
> Ah, good point. I don't see an easy way to make them show in expanded
> form without breaking space handling, unfortunately, but if a v4 is
> needed I can toss that in.

I don't think there's a lot of value in the original behavior, so IMO you don't have to resurrect it (it would make the test scripts less readable again). Just mention the new behavior in the commit message so that everybody knows that the change is more or less intended.

-- Hannes
Previous: Bryan DonlanNext: Johannes Sixt
Message 54 of 60 in “Fix git's test suite to pass when the path contains spaces”
  1. 0/8 Fix git's test suite to pass when the path contains spacesBryan Donlan, Apr 9, 2008
  2. 1/8 git-rebase.sh: Fix --merge --abort failures when path contains whitespaceBryan Donlan, Apr 9, 2008
  3. 2/8 config.c: Escape backslashes in section names properlyBryan Donlan, Apr 9, 2008
  4. 3/8 git-send-email.perl: Handle shell metacharacters in $EDITOR properlyBryan Donlan, Apr 9, 2008
  5. 4/8 test-lib.sh: Fix some missing path quotingBryan Donlan, Apr 9, 2008
  6. 5/8 test-lib.sh: Add a test_set_editor function to safely set $VISUALBryan Donlan, Apr 9, 2008
  7. 6/8 lib-git-svn.sh: Fix quoting issues with paths containing shell metacharactersBryan Donlan, Apr 9, 2008
  8. 7/8 Use test_set_editor in t9001-send-email.shBryan Donlan, Apr 9, 2008
  9. 8/8 Fix tests breaking when checkout path contains shell metacharactersBryan Donlan, Apr 9, 2008
  10. Johannes SixtApr 9, 2008
  11. Bryan DonlanApr 9, 2008
  12. Junio C HamanoApr 9, 2008
  13. Johannes SixtApr 9, 2008
  14. Johannes SixtApr 9, 2008
  15. Bryan DonlanApr 9, 2008
  16. Junio C HamanoApr 10, 2008
  17. Johannes SixtApr 9, 2008
  18. Bryan DonlanApr 9, 2008
  19. Johannes SixtApr 9, 2008
  20. Junio C HamanoApr 9, 2008
  21. Johannes SixtApr 9, 2008
  22. Bryan DonlanApr 9, 2008
  23. Johannes SixtApr 9, 2008
  24. Bryan DonlanApr 9, 2008
  25. Johannes SixtApr 10, 2008
  26. 00/10 Fix git's test suite to pass when the path contains spacesBryan Donlan, Apr 10, 2008
  27. 01/10 git-rebase.sh: Fix --merge --abort failures when path contains whitespaceBryan Donlan, Apr 10, 2008
  28. 02/10 config.c: Escape backslashes in section names properlyBryan Donlan, Apr 10, 2008
  29. 03/10 git-send-email.perl: Handle shell metacharacters in $EDITOR properlyBryan Donlan, Apr 10, 2008
  30. 04/10 test-lib.sh: Add a test_set_editor function to safely set $VISUALBryan Donlan, Apr 10, 2008
  31. 05/10 Use test_set_editor in t9001-send-email.shBryan Donlan, Apr 10, 2008
  32. 06/10 test-lib.sh: Fix some missing path quotingBryan Donlan, Apr 10, 2008
  33. 07/10 lib-git-svn.sh: Fix quoting issues with paths containing shell metacharactersBryan Donlan, Apr 10, 2008
  34. 08/10 Don't use the export NAME=value form in the test scripts.Bryan Donlan, Apr 10, 2008
  35. 09/10 Fix tests breaking when checkout path contains shell metacharactersBryan Donlan, Apr 10, 2008
  36. 10/10 Rename the test trash directory to contain shell metacharacters.Bryan Donlan, Apr 10, 2008
  37. Junio C HamanoApr 10, 2008
  38. Bryan DonlanApr 10, 2008
  39. Junio C HamanoApr 11, 2008
  40. 00/10 Fix git's test suite to pass when the path contains spacesBryan Donlan, May 4, 2008
  41. 01/10 git-rebase.sh: Fix --merge --abort failures when path contains whitespaceBryan Donlan, May 4, 2008
  42. 02/10 config.c: Escape backslashes in section names properlyBryan Donlan, May 4, 2008
  43. 03/10 git-send-email.perl: Handle shell metacharacters in $EDITOR properlyBryan Donlan, May 4, 2008
  44. 04/10 test-lib.sh: Add a test_set_editor function to safely set $VISUALBryan Donlan, May 4, 2008
  45. 05/10 Use test_set_editor in t9001-send-email.shBryan Donlan, May 4, 2008
  46. 06/10 test-lib.sh: Fix some missing path quotingBryan Donlan, May 4, 2008
  47. 07/10 lib-git-svn.sh: Fix quoting issues with paths containing shell metacharactersBryan Donlan, May 4, 2008
  48. 08/10 Don't use the export NAME=value form in the test scripts.Bryan Donlan, May 4, 2008
  49. 09/10 Fix tests breaking when checkout path contains shell metacharactersBryan Donlan, May 4, 2008
  50. 10/10 Rename the test trash directory to contain spaces.Bryan Donlan, May 4, 2008
  51. Johannes SixtMay 5, 2008
  52. Johannes SixtMay 5, 2008
  53. Bryan DonlanMay 5, 2008
  54. Johannes SixtMay 5, 2008
  55. Johannes SixtMay 5, 2008
  56. Bryan DonlanMay 5, 2008
  57. Johannes SixtMay 5, 2008
  58. Johannes SixtApr 10, 2008
  59. Bryan DonlanApr 10, 2008
  60. Junio C HamanoApr 10, 2008

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.