Re: [PATCH v2 2/4] t7505: ensure cleanup after hook blocks merge

2014-01-10 Thread Junio C Hamano
Matthieu Moy matthieu@grenoble-inp.fr writes:

 Ryan Biesemeyer r...@yaauie.com writes:

 +  test_when_finished git merge --abort 
 +  (
 +git checkout -B other HEAD@{1} 

 Weird indentation (space/tab mix).

Also I do not quite see why the body has to be in a subshell.
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 2/4] t7505: ensure cleanup after hook blocks merge

2014-01-09 Thread Matthieu Moy
Ryan Biesemeyer r...@yaauie.com writes:

 +  test_when_finished git merge --abort 
 +  (
 + git checkout -B other HEAD@{1} 

Weird indentation (space/tab mix).

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v2 2/4] t7505: ensure cleanup after hook blocks merge

2014-01-08 Thread Ryan Biesemeyer
Signed-off-by: Ryan Biesemeyer r...@yaauie.com
---
 t/t7505-prepare-commit-msg-hook.sh | 25 +
 1 file changed, 13 insertions(+), 12 deletions(-)

diff --git a/t/t7505-prepare-commit-msg-hook.sh 
b/t/t7505-prepare-commit-msg-hook.sh
index 1c95652..697ecc0 100755
--- a/t/t7505-prepare-commit-msg-hook.sh
+++ b/t/t7505-prepare-commit-msg-hook.sh
@@ -168,18 +168,19 @@ test_expect_success 'with failing hook (--no-verify)' '
 '
 
 test_expect_success 'with failing hook (merge)' '
-
-   git checkout -B other HEAD@{1} 
-   echo more  file 
-   git add file 
-   rm -f $HOOK 
-   git commit -m other 
-   write_script $HOOK -EOF 
-   exit 1
-   EOF
-   git checkout - 
-   test_must_fail git merge other
-
+  test_when_finished git merge --abort 
+  (
+   git checkout -B other HEAD@{1} 
+   echo more  file 
+   git add file 
+   rm -f $HOOK 
+   git commit -m other 
+   write_script $HOOK -EOF 
+   exit 1
+   EOF
+   git checkout - 
+   test_must_fail git merge other
+  )
 '
 
 test_done
-- 
1.8.5

--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html