]> git.99rst.org Git - git.git/commit
stash: fix "--staged" with binary files
authorAdam Johnson <redacted>
Mon, 22 Apr 2024 10:28:14 +0000 (10:28 +0000)
committerJunio C Hamano <redacted>
Mon, 22 Apr 2024 20:57:18 +0000 (13:57 -0700)
commit5fb768640976a9f004925045e51d60ba5a903490
treeb1a0d5090516842aae61292de4f833254d0d194a
parent7380a72f6b4da51f6db975f4a37c4ea9dadbf477
stash: fix "--staged" with binary files

"git stash --staged" errors out when given binary files, after saving the
stash.

This behaviour dates back to the addition of the feature in 41a28eb6c1
(stash: implement '--staged' option for 'push' and 'save', 2021-10-18).
Adding the "--binary" option of "diff-tree" fixes this. The "diff-tree" call
in stash_patch() also omits "--binary", but that is fine since binary files
cannot be selected interactively.

Helped-By: Jeff King <redacted>
Helped-By: Randall S. Becker <redacted>
Signed-off-by: Adam Johnson <redacted>
Signed-off-by: Junio C Hamano <redacted>
builtin/stash.c
t/t3903-stash.sh
git clone https://git.99rst.org/PROJECT