This cleans up the 'merge --squash c3 with c7' test by removing some
unnecessary braces and removing a pipe. Finally, unindent a here-doc for
style.

Also, remove stray spaces after "> " for style.

Helped-by: SZEDER Gábor <szeder....@gmail.com>
Helped-by: Eric Sunshine <sunsh...@sunshineco.com>
Reviewed-by: Junio C Hamano <gits...@pobox.com>
Signed-off-by: Denton Liu <liu.den...@gmail.com>
---
 t/t7600-merge.sh | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/t/t7600-merge.sh b/t/t7600-merge.sh
index 106148254d..a9620cd991 100755
--- a/t/t7600-merge.sh
+++ b/t/t7600-merge.sh
@@ -233,17 +233,17 @@ test_expect_success 'merge --squash c3 with c7' '
        cat result.9z >file &&
        git commit --no-edit -a &&
 
-       {
-               cat <<-EOF
-               Squashed commit of the following:
+       cat >expect <<-EOF &&
+       Squashed commit of the following:
 
-               $(git show -s c7)
+       $(git show -s c7)
 
-               # Conflicts:
-               #       file
-               EOF
-       } >expect &&
-       git cat-file commit HEAD | sed -e '1,/^$/d' >actual &&
+       # Conflicts:
+       #       file
+       EOF
+       git cat-file commit HEAD >actual &&
+       sed -e '1,/^$/d' <actual >tmp &&
+       mv tmp actual &&
        test_cmp expect actual
 '
 
@@ -683,7 +683,7 @@ cat >editor <<\EOF
        cat <"$1"
 ) >"$1.tmp" && mv "$1.tmp" "$1"
 # strip comments and blank lines from end of message
-sed -e '/^#/d' < "$1" | sed -e :a -e '/^\n*$/{$d;N;ba' -e '}' > expected
+sed -e '/^#/d' < "$1" | sed -e :a -e '/^\n*$/{$d;N;ba' -e '}' >expected
 EOF
 chmod 755 editor
 
@@ -814,7 +814,7 @@ EOF
 test_expect_success EXECKEEPSPID 'killed merge can be completed with 
--continue' '
        git reset --hard c0 &&
        ! "$SHELL_PATH" -c '\''
-         echo kill -TERM $$ >> .git/FAKE_EDITOR
+         echo kill -TERM $$ >>.git/FAKE_EDITOR
          GIT_EDITOR=.git/FAKE_EDITOR
          export GIT_EDITOR
          exec git merge --no-ff --edit c1'\'' &&
-- 
2.21.0.512.g57bf1b23e1

Reply via email to