Re: [PATCH] lib-rebase: use write_script

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: [PATCH] lib-rebase: use write_script

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:57:56

Andrew Pimlott [off-list ref] writes:
quoted hunk
Signed-off-by: Andrew Pimlott <redacted>
---
 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.

Re: [PATCH] lib-rebase: use write_script

From: Andrew Pimlott <hidden>
Date: 2016-06-15 22:57:56

Excerpts from Junio C Hamano's message of Thu Jun 27 11:37:31 -0700 2013:
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.
Yes, the goal is to make that file consistently use the current
practice.  (My syntax highlighting doesn't like it, but...)  I should
update the function I introduced first.  I will re-submit the rebase -i
--autosquash  patch and wait for acceptance before trying to fix other
things.

Andrew
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help