]> git.ipfire.org Git - thirdparty/git.git/blame - t/t3908-stash-in-worktree.sh
The sixth batch
[thirdparty/git.git] / t / t3908-stash-in-worktree.sh
CommitLineData
dfd557c9
JS
1#!/bin/sh
2#
3# Copyright (c) 2019 Johannes E Schindelin
4#
5
6test_description='Test git stash in a worktree'
7
8. ./test-lib.sh
9
10test_expect_success 'setup' '
11 test_commit initial &&
12 git worktree add wt &&
13 test_commit -C wt in-worktree
14'
15
16test_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
27test_done