1
0
Fork 0
git/t/t3908-stash-in-worktree.sh
Daniel Baumann 54102a2c29
Adding upstream version 1:2.47.2.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-23 07:43:39 +02:00

28 lines
483 B
Bash
Executable file

#!/bin/sh
#
# Copyright (c) 2019 Johannes E Schindelin
#
test_description='Test git stash in a worktree'
TEST_PASSES_SANITIZE_LEAK=true
. ./test-lib.sh
test_expect_success 'setup' '
test_commit initial &&
git worktree add wt &&
test_commit -C wt in-worktree
'
test_expect_success 'apply in subdirectory' '
mkdir wt/subdir &&
(
cd wt/subdir &&
echo modified >../initial.t &&
git stash &&
git stash apply >out
) &&
grep "\.\.\/initial\.t" wt/subdir/out
'
test_done