diff options
author | Junio C Hamano <gitster@pobox.com> | 2024-04-30 14:49:43 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2024-04-30 14:49:43 -0700 |
commit | 90f6b5a597c083d898fcc5d3ae3dbb50779b72a6 (patch) | |
tree | b77fb2106f5d20b3e2f150eeb9e206a5594c72c5 /builtin | |
parent | 708e9257f8045e00dca1241ab13c1e8033ead41c (diff) | |
parent | 5fb768640976a9f004925045e51d60ba5a903490 (diff) | |
download | git-90f6b5a597c083d898fcc5d3ae3dbb50779b72a6.tar.gz |
Merge branch 'aj/stash-staged-fix'
"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 'builtin')
-rw-r--r-- | builtin/stash.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin/stash.c b/builtin/stash.c index 062be1fbc0..7751bca868 100644 --- a/builtin/stash.c +++ b/builtin/stash.c @@ -1205,8 +1205,8 @@ static int stash_staged(struct stash_info *info, struct strbuf *out_patch, } cp_diff_tree.git_cmd = 1; - strvec_pushl(&cp_diff_tree.args, "diff-tree", "-p", "-U1", "HEAD", - oid_to_hex(&info->w_tree), "--", NULL); + strvec_pushl(&cp_diff_tree.args, "diff-tree", "-p", "--binary", + "-U1", "HEAD", oid_to_hex(&info->w_tree), "--", NULL); if (pipe_command(&cp_diff_tree, NULL, 0, out_patch, 0, NULL, 0)) { ret = -1; goto done; |