about summary refs log tree commit diff
path: root/t/t3908-stash-in-worktree.sh
blob: 2b2b366ef94b7ca429416d81cc4858201658d3cb (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/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