Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 't/t5543-atomic-push.sh')
-rwxr-xr-xt/t5543-atomic-push.sh14
1 files changed, 4 insertions, 10 deletions
diff --git a/t/t5543-atomic-push.sh b/t/t5543-atomic-push.sh
index bfee461861..70431122a4 100755
--- a/t/t5543-atomic-push.sh
+++ b/t/t5543-atomic-push.sh
@@ -162,16 +162,10 @@ test_expect_success 'atomic push obeys update hook preventing a branch to be pus
test_commit two &&
git push --mirror up
) &&
- (
- cd upstream &&
- HOOKDIR="$(git rev-parse --git-dir)/hooks" &&
- HOOK="$HOOKDIR/update" &&
- mkdir -p "$HOOKDIR" &&
- write_script "$HOOK" <<-\EOF
- # only allow update to main from now on
- test "$1" = "refs/heads/main"
- EOF
- ) &&
+ test_hook -C upstream update <<-\EOF &&
+ # only allow update to main from now on
+ test "$1" = "refs/heads/main"
+ EOF
(
cd workbench &&
git checkout main &&