You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
452 B
28 lines
452 B
5 years ago
|
#!/bin/sh
|
||
|
#
|
||
|
# Copyright (c) 2019 Johannes E Schindelin
|
||
|
#
|
||
|
|
||
|
test_description='Test git stash in a worktree'
|
||
|
|
||
|
. ./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
|