diff options
| author | Junio C Hamano <gitster@pobox.com> | 2024-06-28 15:53:07 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2024-06-28 15:53:07 -0700 |
| commit | 2a78de0d9f80340b0342e487afaf7e90c871c528 (patch) | |
| tree | e9736e6093c573192d443885370a921d9fe6ef35 /t | |
| parent | a41463e4371976f17f6d58caa5e6d555ecaa02e3 (diff) | |
| parent | 5fb768640976a9f004925045e51d60ba5a903490 (diff) | |
| download | git-2a78de0d9f80340b0342e487afaf7e90c871c528.tar.gz | |
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
Diffstat (limited to 't')
| -rwxr-xr-x | t/t3903-stash.sh | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/t/t3903-stash.sh b/t/t3903-stash.sh index 00db82fb24..a7f71f8126 100755 --- a/t/t3903-stash.sh +++ b/t/t3903-stash.sh @@ -393,6 +393,15 @@ 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_grep -e "subcommand wasn'\''t specified; '\''push'\'' can'\''t be assumed due to unexpected token '\''drop'\''" err |
