summaryrefslogtreecommitdiff
path: root/t/t2401-worktree-prune.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/t2401-worktree-prune.sh')
-rwxr-xr-xt/t2401-worktree-prune.sh14
1 files changed, 7 insertions, 7 deletions
diff --git a/t/t2401-worktree-prune.sh b/t/t2401-worktree-prune.sh
index a615d3b483..3d28c7f06b 100755
--- a/t/t2401-worktree-prune.sh
+++ b/t/t2401-worktree-prune.sh
@@ -19,7 +19,7 @@ test_expect_success 'worktree prune on normal repo' '
test_expect_success 'prune files inside $GIT_DIR/worktrees' '
mkdir .git/worktrees &&
: >.git/worktrees/abc &&
- git worktree prune --verbose >actual &&
+ git worktree prune --verbose 2>actual &&
cat >expect <<EOF &&
Removing worktrees/abc: not a valid directory
EOF
@@ -34,7 +34,7 @@ test_expect_success 'prune directories without gitdir' '
cat >expect <<EOF &&
Removing worktrees/def: gitdir file does not exist
EOF
- git worktree prune --verbose >actual &&
+ git worktree prune --verbose 2>actual &&
test_cmp expect actual &&
! test -d .git/worktrees/def &&
! test -d .git/worktrees
@@ -45,7 +45,7 @@ test_expect_success SANITY 'prune directories with unreadable gitdir' '
: >.git/worktrees/def/def &&
: >.git/worktrees/def/gitdir &&
chmod u-r .git/worktrees/def/gitdir &&
- git worktree prune --verbose >actual &&
+ git worktree prune --verbose 2>actual &&
test_i18ngrep "Removing worktrees/def: unable to read gitdir file" actual &&
! test -d .git/worktrees/def &&
! test -d .git/worktrees
@@ -55,7 +55,7 @@ test_expect_success 'prune directories with invalid gitdir' '
mkdir -p .git/worktrees/def/abc &&
: >.git/worktrees/def/def &&
: >.git/worktrees/def/gitdir &&
- git worktree prune --verbose >actual &&
+ git worktree prune --verbose 2>actual &&
test_i18ngrep "Removing worktrees/def: invalid gitdir file" actual &&
! test -d .git/worktrees/def &&
! test -d .git/worktrees
@@ -65,7 +65,7 @@ test_expect_success 'prune directories with gitdir pointing to nowhere' '
mkdir -p .git/worktrees/def/abc &&
: >.git/worktrees/def/def &&
echo "$(pwd)"/nowhere >.git/worktrees/def/gitdir &&
- git worktree prune --verbose >actual &&
+ git worktree prune --verbose 2>actual &&
test_i18ngrep "Removing worktrees/def: gitdir file points to non-existent location" actual &&
! test -d .git/worktrees/def &&
! test -d .git/worktrees
@@ -101,7 +101,7 @@ test_expect_success 'prune duplicate (linked/linked)' '
git worktree add --detach w2 &&
sed "s/w2/w1/" .git/worktrees/w2/gitdir >.git/worktrees/w2/gitdir.new &&
mv .git/worktrees/w2/gitdir.new .git/worktrees/w2/gitdir &&
- git worktree prune --verbose >actual &&
+ git worktree prune --verbose 2>actual &&
test_i18ngrep "duplicate entry" actual &&
test -d .git/worktrees/w1 &&
! test -d .git/worktrees/w2
@@ -114,7 +114,7 @@ test_expect_success 'prune duplicate (main/linked)' '
git -C repo worktree add --detach ../wt &&
rm -fr wt &&
mv repo wt &&
- git -C wt worktree prune --verbose >actual &&
+ git -C wt worktree prune --verbose 2>actual &&
test_i18ngrep "duplicate entry" actual &&
! test -d .git/worktrees/wt
'