From: Junio C Hamano Date: Fri, 28 Jun 2024 22:53:07 +0000 (-0700) Subject: Merge branch 'aj/stash-staged-fix' into maint-2.45 X-Git-Tag: v2.46.0-rc0~22^2~23 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2a78de0d9f80340b0342e487afaf7e90c871c528;p=thirdparty%2Fgit.git Merge branch 'aj/stash-staged-fix' into maint-2.45 "git stash -S" did not handle binary files correctly, which has been corrected. * aj/stash-staged-fix: stash: fix "--staged" with binary files --- 2a78de0d9f80340b0342e487afaf7e90c871c528 diff --cc t/t3903-stash.sh index 00db82fb24,a62b3a3d40..a7f71f8126 --- a/t/t3903-stash.sh +++ b/t/t3903-stash.sh @@@ -393,9 -318,18 +393,18 @@@ test_expect_success 'stash --staged' test bar,bar4 = $(cat file),$(cat file2) ' + test_expect_success 'stash --staged with binary file' ' + printf "\0" >file && + git add file && + git stash --staged && + git stash pop && + printf "\0" >expect && + test_cmp expect file + ' + test_expect_success 'dont assume push with non-option args' ' test_must_fail git stash -q drop 2>err && - test_i18ngrep -e "subcommand wasn'\''t specified; '\''push'\'' can'\''t be assumed due to unexpected token '\''drop'\''" err + test_grep -e "subcommand wasn'\''t specified; '\''push'\'' can'\''t be assumed due to unexpected token '\''drop'\''" err ' test_expect_success 'stash --invalid-option' '