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

Re: [PATCH 8/9] test: replace shebangs with descriptions in shell libraries

From
Eric Sunshine <sunshine@sunshineco.com>
Date
Nov 26, 2013, 05:18 UTC
Message-ID
<CAPig+cQizcuPjastanvyKkuo2=p9BPhBE-PhBC2J2EKwXvLekg@mail.gmail.com>
In-Reply-To
<20131125210306.GY4212@google.com>
On Mon, Nov 25, 2013 at 4:03 PM, Jonathan Nieder <jrnieder@gmail.com> wrote:
Show 22 quoted lines
> A #! line in these files is misleading, since these scriptlets are
> meant to be sourced with '.' (using whatever shell sources them)
> instead of run directly using the interpreter named on the #! line.
>
> Removing the #! line shouldn't hurt syntax highlighting since
> these files have filenames ending with '.sh'.  For documentation,
> add a brief description of how the files are meant to be used in
> place of the shebang line.
>
> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
> ---
> diff --git a/t/lib-bash.sh b/t/lib-bash.sh
> index 11397f7..10b76df 100644
> --- a/t/lib-bash.sh
> +++ b/t/lib-bash.sh
> @@ -1,7 +1,6 @@
> -#!/bin/sh
> -#
> -# Ensures that tests are run under Bash; primarily intended for running tests
> -# of the completion script.
> +# Shell library sourced instead of ./test-lib.sh by tests that need
> +# to run under Bash; primary intended for tests of the completion
s/primary/primarily/
> +# script.
>
>  if test -n "$BASH" && test -z "$POSIXLY_CORRECT"; then
>         # we are in full-on bash mode
Previous: Jonathan NiederNext: Jonathan Nieder
Message 11 of 13 in “War on #! lines in shell libraries”
  1. 0/9 War on #! lines in shell librariesJonathan Nieder, Nov 25, 2013
  2. 1/9 mark Windows build scripts executableJonathan Nieder, Nov 25, 2013
  3. 2/9 mark perl test scripts executableJonathan Nieder, Nov 25, 2013
  4. 3/9 mark contributed hooks executableJonathan Nieder, Nov 25, 2013
  5. 4/9 contrib: remove git-p4importJonathan Nieder, Nov 25, 2013
  6. Pete WyckoffNov 26, 2013
  7. 5/9 gitk: chmod +x po2msgJonathan Nieder, Nov 25, 2013
  8. 6/9 git-gui: chmod +x po2msg, windows/git-gui.shJonathan Nieder, Nov 25, 2013
  9. 7/9 test: make FILEMODE a lazy prereqJonathan Nieder, Nov 25, 2013
  10. 8/9 test: replace shebangs with descriptions in shell librariesJonathan Nieder, Nov 25, 2013
  11. Eric SunshineNov 26, 2013
  12. 8/9 test: replace shebangs with descriptions in shell librariesJonathan Nieder, Nov 26, 2013
  13. 9/9 remove #!interpreter line from shell librariesJonathan Nieder, Nov 25, 2013

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.