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

Re: [PATCH 7/6] t0021: use $SHELL_PATH for the filter script

From
Jeff King <peff@peff.net>
Date
Jan 4, 2010, 16:03 UTC
Message-ID
<20100104160317.GB9136@coredump.intra.peff.net>
In-Reply-To
<4B420E4F.1040706@kdbg.org>
On Mon, Jan 04, 2010 at 04:50:39PM +0100, Johannes Sixt wrote:
Show 12 quoted lines
> >>On Windows, we need the shbang line to correctly invoke shell scripts via
> >>a POSIX shell, except when the script is invoked via 'sh -c' because
> >>sh (a bash) does "the right thing". Since nowadays the clean and smudge
> >>filters are not always invoked via 'sh -c' anymore, we have to mark the
> >>the one in t0021-conversion with #!$SHELL_PATH.
> >
> >Hrm. This does mean we might be breaking users who have helper scripts
> >in a similar state to those in the test suite...
> 
> Not helper scripts in general, but only clean and smudge filters,
> because these have been invoked with "sh -c" so far. Everything else,
> that was not run via "sh -c", but now is, is safe.

I converted more than that; see my 2/6. It is also the pager, the imap-send tunnel helper, and external merge helpers. Not the editor, since it already had the no-metacharacters optimization (though it, too, could be affected if we implement your DWIM trick instead of the metacharacter thing).

So I think we need to make a conscious decision that this is an acceptable change of behavior (and I am totally fine with the change happening -- I just want to be clear about the extent of what is being changed).

-Peff
Previous: Johannes SixtNext: Johannes Sixt
Message 32 of 33 in “Giving command line parameter to textconv command?”
  1. Nanako ShiraishiDec 14, 2009
  2. Junio C HamanoDec 14, 2009
  3. Nanako ShiraishiDec 15, 2009
  4. Junio C HamanoDec 15, 2009
  5. Jeff KingDec 15, 2009
  6. Junio C HamanoDec 16, 2009
  7. Jeff KingDec 16, 2009
  8. Jeff KingDec 15, 2009
  9. Junio C HamanoDec 15, 2009
  10. Nanako ShiraishiDec 30, 2009
  11. Junio C HamanoDec 30, 2009
  12. Jeff KingDec 30, 2009
  13. 1/6 run-command: add "use shell" optionJeff King, Dec 30, 2009
  14. Erik Faye-LundDec 30, 2009
  15. Johannes SixtJan 1, 2010
  16. 2/6 run-command: convert simple callsites to use_shellJeff King, Dec 30, 2009
  17. 3/6 run-command: optimize out useless shell callsJeff King, Dec 30, 2009
  18. Johannes SixtDec 31, 2009
  19. Junio C HamanoDec 31, 2009
  20. Johannes SixtDec 31, 2009
  21. Jeff KingDec 31, 2009
  22. Johannes SixtDec 31, 2009
  23. Jeff KingJan 1, 2010
  24. Johannes SixtJan 1, 2010
  25. 4/6 editor: use run_command's shell featureJeff King, Dec 30, 2009
  26. 5/6 textconv: use shell to run helperJeff King, Dec 30, 2009
  27. 6/6 diff: run external diff helper with shellJeff King, Dec 30, 2009
  28. 7/6 t0021: use $SHELL_PATH for the filter scriptJohannes Sixt, Jan 1, 2010
  29. 8/6 t4030, t4031: work around bogus MSYS bash path conversionJohannes Sixt, Jan 1, 2010
  30. Jeff KingJan 3, 2010
  31. Johannes SixtJan 4, 2010
  32. Jeff KingJan 4, 2010
  33. Johannes SixtJan 4, 2010

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.