From: Junio C Hamano Date: Wed, 27 May 2026 05:15:44 +0000 (+0900) Subject: Merge branch 'ps/t3903-cover-stash-include-untracked' X-Git-Tag: v2.55.0-rc0~50 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c5e6e497ac6c9a80ec4b04752cce1c35337bd6b9;p=thirdparty%2Fgit.git Merge branch 'ps/t3903-cover-stash-include-untracked' Test coverage has been added to "git stash --include-untracked". * ps/t3903-cover-stash-include-untracked: stash: add coverage for show --include-untracked --- c5e6e497ac6c9a80ec4b04752cce1c35337bd6b9 diff --cc t/t3903-stash.sh index bdaad22e1f,d4867536b9..ecc35aae82 --- a/t/t3903-stash.sh +++ b/t/t3903-stash.sh @@@ -1791,27 -1790,21 +1791,44 @@@ test_expect_success 'stash.index=false test_cmp expect file ' +test_expect_success 'apply with custom conflict labels' ' + git reset --hard initial && + test_commit label-base conflict-file base-content && + echo stashed >conflict-file && + git stash push -m "stashed" && + test_commit label-upstream conflict-file upstream-content && + test_must_fail git -c merge.conflictStyle=diff3 stash apply --label-ours=UP --label-theirs=STASH && + test_grep "^<<<<<<< UP" conflict-file && + test_grep "^||||||| Stash base" conflict-file && + test_grep "^>>>>>>> STASH" conflict-file +' + +test_expect_success 'apply with empty conflict labels' ' + git reset --hard initial && + test_commit empty-label-base conflict-file base-content && + echo stashed >conflict-file && + git stash push -m "stashed" && + test_commit empty-label-upstream conflict-file upstream-content && + test_must_fail git stash apply --label-ours= --label-theirs= && + test_grep "^<<<<<<<$" conflict-file && + test_grep "^>>>>>>>$" conflict-file +' + + test_expect_success 'stash show --include-untracked includes untracked files' ' + git reset --hard && + + echo tracked >tracked && + git add tracked && + git commit -m "base" && + + echo change >>tracked && + echo untracked >untracked && + + git stash push --include-untracked && + test_path_is_missing untracked && + + git stash show --include-untracked >actual && + test_grep "untracked" actual + ' + test_done