diff options
author | Junio C Hamano <gitster@pobox.com> | 2008-02-22 22:54:37 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-02-22 22:54:37 -0800 |
commit | 50f3ac29cbadbf7e0ff099b493b00cfa4129e1e0 (patch) | |
tree | 72b756b4c7d60709b7484cceeb3a1d82a18a86af /t/t5401-update-hooks.sh | |
parent | builtin-reflog.c: fix typo that accesses an unset variable (diff) | |
parent | builtin-reflog.c: don't install new reflog on write failure (diff) | |
download | tgif-50f3ac29cbadbf7e0ff099b493b00cfa4129e1e0.tar.xz |
Merge branch 'bc/reflog-fix' into js/reflog-delete
* bc/reflog-fix: (1490 commits)
builtin-reflog.c: don't install new reflog on write failure
hash: fix lookup_hash semantics
gitweb: Better chopping in commit search results
builtin-tag.c: remove cruft
git-merge-index documentation: clarify synopsis
send-email: fix In-Reply-To regression
git-reset --hard and git-read-tree --reset: fix read_cache_unmerged()
Teach git-grep --name-only as synonym for -l
diff: fix java funcname pattern for solaris
t3404: use configured shell instead of /bin/sh
git_config_*: don't assume we are parsing a config file
prefix_path: use is_absolute_path() instead of *orig == '/'
git-clean: handle errors if removing files fails
Clarified the meaning of git-add -u in the documentation
git-clone.sh: properly configure remote even if remote's head is dangling
git.el: Set process-environment instead of invoking env
Documentation/git-stash: document options for git stash list
send-email: squelch warning due to comparing undefined $_ to ""
cvsexportcommit: be graceful when "cvs status" reorders the arguments
Rename git-core rpm to just git and rename the meta-pacakge to git-all.
...
Conflicts:
Documentation/git-reflog.txt
t/t1410-reflog.sh
Diffstat (limited to 't/t5401-update-hooks.sh')
-rwxr-xr-x | t/t5401-update-hooks.sh | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/t/t5401-update-hooks.sh b/t/t5401-update-hooks.sh index c5dd30d0a4..9a12024241 100755 --- a/t/t5401-update-hooks.sh +++ b/t/t5401-update-hooks.sh @@ -25,7 +25,7 @@ test_expect_success setup ' cat >victim/.git/hooks/pre-receive <<'EOF' #!/bin/sh -printf "$@" >>$GIT_DIR/pre-receive.args +printf %s "$@" >>$GIT_DIR/pre-receive.args cat - >$GIT_DIR/pre-receive.stdin echo STDOUT pre-receive echo STDERR pre-receive >&2 @@ -35,7 +35,7 @@ chmod u+x victim/.git/hooks/pre-receive cat >victim/.git/hooks/update <<'EOF' #!/bin/sh echo "$@" >>$GIT_DIR/update.args -read x; printf "$x" >$GIT_DIR/update.stdin +read x; printf %s "$x" >$GIT_DIR/update.stdin echo STDOUT update $1 echo STDERR update $1 >&2 test "$1" = refs/heads/master || exit @@ -44,7 +44,7 @@ chmod u+x victim/.git/hooks/update cat >victim/.git/hooks/post-receive <<'EOF' #!/bin/sh -printf "$@" >>$GIT_DIR/post-receive.args +printf %s "$@" >>$GIT_DIR/post-receive.args cat - >$GIT_DIR/post-receive.stdin echo STDOUT post-receive echo STDERR post-receive >&2 @@ -54,14 +54,14 @@ chmod u+x victim/.git/hooks/post-receive cat >victim/.git/hooks/post-update <<'EOF' #!/bin/sh echo "$@" >>$GIT_DIR/post-update.args -read x; printf "$x" >$GIT_DIR/post-update.stdin +read x; printf %s "$x" >$GIT_DIR/post-update.stdin echo STDOUT post-update echo STDERR post-update >&2 EOF chmod u+x victim/.git/hooks/post-update -test_expect_failure push ' - git-send-pack --force ./victim/.git master tofail >send.out 2>send.err +test_expect_success push ' + ! git-send-pack --force ./victim/.git master tofail >send.out 2>send.err ' test_expect_success 'updated as expected' ' @@ -112,8 +112,8 @@ test_expect_success 'all *-receive hook args are empty' ' ! test -s victim/.git/post-receive.args ' -test_expect_failure 'send-pack produced no output' ' - test -s send.out +test_expect_success 'send-pack produced no output' ' + ! test -s send.out ' cat <<EOF >expect @@ -129,7 +129,7 @@ STDOUT post-update STDERR post-update EOF test_expect_success 'send-pack stderr contains hook messages' ' - egrep ^STD send.err >actual && + grep ^STD send.err >actual && git diff - actual <expect ' |