receive-pack: Send hook output over side band #2
[gitweb.git] / t / t5401-update-hooks.sh
index ee769d6695ee91120671c485924d804f14c80424..c3cf397b030e298b0fafdf8fc8a9bbf88f7d6bf4 100755 (executable)
@@ -17,7 +17,7 @@ test_expect_success setup '
        commit1=$(echo modify | git commit-tree $tree1 -p $commit0) &&
        git update-ref refs/heads/master $commit0 &&
        git update-ref refs/heads/tofail $commit1 &&
-       git-clone ./. victim &&
+       git clone ./. victim &&
        GIT_DIR=victim/.git git update-ref refs/heads/tofail $commit1 &&
        git update-ref refs/heads/master $commit1 &&
        git update-ref refs/heads/tofail $commit0
@@ -61,7 +61,7 @@ EOF
 chmod u+x victim/.git/hooks/post-update
 
 test_expect_success push '
-       test_must_fail git-send-pack --force ./victim/.git \
+       test_must_fail git send-pack --force ./victim/.git \
                master tofail >send.out 2>send.err
 '
 
@@ -118,19 +118,19 @@ test_expect_success 'send-pack produced no output' '
 '
 
 cat <<EOF >expect
-STDOUT pre-receive
-STDERR pre-receive
-STDOUT update refs/heads/master
-STDERR update refs/heads/master
-STDOUT update refs/heads/tofail
-STDERR update refs/heads/tofail
-STDOUT post-receive
-STDERR post-receive
-STDOUT post-update
-STDERR post-update
+remote: STDOUT pre-receive
+remote: STDERR pre-receive
+remote: STDOUT update refs/heads/master
+remote: STDERR update refs/heads/master
+remote: STDOUT update refs/heads/tofail
+remote: STDERR update refs/heads/tofail
+remote: STDOUT post-receive
+remote: STDERR post-receive
+remote: STDOUT post-update
+remote: STDERR post-update
 EOF
 test_expect_success 'send-pack stderr contains hook messages' '
-       grep ^STD send.err >actual &&
+       grep ^remote: send.err | sed "s/ *\$//" >actual &&
        test_cmp - actual <expect
 '