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

Re: [PATCH] lib-rebase: use write_script

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 27, 2013, 18:37 UTC
Message-ID
<7va9mbs8lw.fsf@alter.siamese.dyndns.org>
In-Reply-To
<1372357825-21824-1-git-send-email-andrew@pimlott.net>
Andrew Pimlott <andrew@pimlott.net> writes:
Show 27 quoted lines
> Signed-off-by: Andrew Pimlott <andrew@pimlott.net>
> ---
>  t/lib-rebase.sh |    4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/t/lib-rebase.sh b/t/lib-rebase.sh
> index 0b41155..7b42199 100644
> --- a/t/lib-rebase.sh
> +++ b/t/lib-rebase.sh
> @@ -24,8 +24,7 @@
>  #   ">" -- Add a blank line.
>  
>  set_fake_editor () {
> -	echo "#!$SHELL_PATH" >fake-editor.sh
> -	cat >> fake-editor.sh <<\EOF
> +	write_script fake-editor.sh <<\EOF
>  case "$1" in
>  */COMMIT_EDITMSG)
>  	test -z "$EXPECT_HEADER_COUNT" ||
> @@ -65,7 +64,6 @@ cat "$1"
>  EOF
>  
>  	test_set_editor "$(pwd)/fake-editor.sh"
> -	chmod a+x fake-editor.sh
>  }
>  
>  # After set_cat_todo_editor, rebase -i will write the todo list (ignoring
Thanks, but it should probably be
	write_script fake-editor.sh <<-\EOF
        case "$1" in
        ...
        EOF
        test_set_editor ...
if the aim is to modernize this part.
Previous: Andrew PimlottNext: Andrew Pimlott
Message 2 of 6 in “lib-rebase: use write_script”
  1. lib-rebase: use write_scriptAndrew Pimlott, Jun 27, 2013
  2. Junio C HamanoJun 27, 2013
  3. Andrew PimlottJun 27, 2013
  4. Junio C HamanoJun 27, 2013
  5. Andrew PimlottJul 1, 2013
  6. Junio C HamanoJul 1, 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.