Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2019-04-22 05:14:45 +0300
committerJunio C Hamano <gitster@pobox.com>2019-04-22 05:14:45 +0300
commit8aed8034be53fc67bbc470357b124abd5679fb91 (patch)
tree3b00c3d92e65611068406c491b1636bb5b7ecd80 /t
parent0ba1ba4846aeb079b8eb1967a52917d32923a5ef (diff)
parent8e407bc817febdf1ff2edcce01945b3eac6d376b (diff)
Merge branch 'tg/stash-in-c-show-default-to-p-fix'
A regression fix. * tg/stash-in-c-show-default-to-p-fix: stash: setup default diff output format if necessary
Diffstat (limited to 't')
-rwxr-xr-xt/t3903-stash.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/t/t3903-stash.sh b/t/t3903-stash.sh
index 97cc71fbaf..ea30d5f6a0 100755
--- a/t/t3903-stash.sh
+++ b/t/t3903-stash.sh
@@ -612,6 +612,24 @@ test_expect_success 'stash show -p - no stashes on stack, stash-like argument' '
test_cmp expected actual
'
+test_expect_success 'stash show --patience shows diff' '
+ git reset --hard &&
+ echo foo >>file &&
+ STASH_ID=$(git stash create) &&
+ git reset --hard &&
+ cat >expected <<-EOF &&
+ diff --git a/file b/file
+ index 7601807..71b52c4 100644
+ --- a/file
+ +++ b/file
+ @@ -1 +1,2 @@
+ baz
+ +foo
+ EOF
+ git stash show --patience ${STASH_ID} >actual &&
+ test_cmp expected actual
+'
+
test_expect_success 'drop: fail early if specified stash is not a stash ref' '
git stash clear &&
test_when_finished "git reset --hard HEAD && git stash clear" &&