]> git.ipfire.org Git - thirdparty/git.git/blob - t/t3908-stash-in-worktree.sh
Merge branch 'cb/curl-use-xmalloc'
[thirdparty/git.git] / t / t3908-stash-in-worktree.sh
1 #!/bin/sh
2 #
3 # Copyright (c) 2019 Johannes E Schindelin
4 #
5
6 test_description='Test git stash in a worktree'
7
8 . ./test-lib.sh
9
10 test_expect_success 'setup' '
11 test_commit initial &&
12 git worktree add wt &&
13 test_commit -C wt in-worktree
14 '
15
16 test_expect_success 'apply in subdirectory' '
17 mkdir wt/subdir &&
18 (
19 cd wt/subdir &&
20 echo modified >../initial.t &&
21 git stash &&
22 git stash apply >out
23 ) &&
24 grep "\.\.\/initial\.t" wt/subdir/out
25 '
26
27 test_done