From 7e9e048661477ad17f57a7153eaaec490660e767 Mon Sep 17 00:00:00 2001 From: Matthieu Moy Date: Thu, 16 Apr 2015 09:02:31 +0200 Subject: [PATCH] stash -p: demonstrate failure of split with mixed y/n Signed-off-by: Matthieu Moy Signed-off-by: Junio C Hamano --- t/t3904-stash-patch.sh | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/t/t3904-stash-patch.sh b/t/t3904-stash-patch.sh index 0f8f47fabc..38e730090f 100755 --- a/t/t3904-stash-patch.sh +++ b/t/t3904-stash-patch.sh @@ -81,4 +81,27 @@ test_expect_success 'none of this moved HEAD' ' verify_saved_head ' +test_expect_failure 'stash -p with split hunk' ' + git reset --hard && + cat >test <<-\EOF && + aaa + bbb + ccc + EOF + git add test && + git commit -m "initial" && + cat >test <<-\EOF && + aaa + added line 1 + bbb + added line 2 + ccc + EOF + printf "%s\n" s n y q | + test_might_fail git stash -p 2>error && + ! test_must_be_empty error && + grep "added line 1" test && + ! grep "added line 2" test +' + test_done -- 2.11.4.GIT