]>
Commit | Line | Data |
---|---|---|
dfd557c9 JS |
1 | #!/bin/sh |
2 | # | |
3 | # Copyright (c) 2019 Johannes E Schindelin | |
4 | # | |
5 | ||
6 | test_description='Test git stash in a worktree' | |
7 | ||
d96fb140 | 8 | TEST_PASSES_SANITIZE_LEAK=true |
dfd557c9 JS |
9 | . ./test-lib.sh |
10 | ||
11 | test_expect_success 'setup' ' | |
12 | test_commit initial && | |
13 | git worktree add wt && | |
14 | test_commit -C wt in-worktree | |
15 | ' | |
16 | ||
17 | test_expect_success 'apply in subdirectory' ' | |
18 | mkdir wt/subdir && | |
19 | ( | |
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 | |
26 | ' | |
27 | ||
28 | test_done |