The second batch
[git.git] / t / t3908-stash-in-worktree.sh
blob347a89b030b68dc87ecea8f40dfe9d1b0ca8db16
1 #!/bin/sh
3 # Copyright (c) 2019 Johannes E Schindelin
6 test_description='Test git stash in a worktree'
8 TEST_PASSES_SANITIZE_LEAK=true
9 . ./test-lib.sh
11 test_expect_success 'setup' '
12 test_commit initial &&
13 git worktree add wt &&
14 test_commit -C wt in-worktree
17 test_expect_success 'apply in subdirectory' '
18 mkdir wt/subdir &&
20 cd wt/subdir &&
21 echo modified >../initial.t &&
22 git stash &&
23 git stash apply >out
24 ) &&
25 grep "\.\.\/initial\.t" wt/subdir/out
28 test_done