interplane.Get Omega
Read in your language

git

[Ported from github.com/git/git] Sync with Git 2.56.1

Brought by drakestapleton

branch master Branches Tags History

git / t / t3908-stash-in-worktree.sh

27 lines · 457 bytes Raw Blame History
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 test_grep "\.\.\/initial\.t" wt/subdir/out
25'
26
27test_done