diff options
| author | Junio C Hamano <gitster@pobox.com> | 2025-09-16 13:36:50 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-09-16 13:36:50 -0700 |
| commit | e335ff31f70aefc91991063cdc05967096bb1be3 (patch) | |
| tree | 57afc99df17a39dddd5e04369347d3024ba7e085 /builtin/stash.c | |
| parent | Git 2.51 (diff) | |
| parent | contrib/diff-highlight: mention interactive.diffFilter (diff) | |
| download | git-e335ff31f70aefc91991063cdc05967096bb1be3.tar.gz git-e335ff31f70aefc91991063cdc05967096bb1be3.zip | |
Merge branch 'jk/add-i-color' into jk/color-variable-fixes
* jk/add-i-color:
contrib/diff-highlight: mention interactive.diffFilter
add-interactive: manually fall back color config to color.ui
add-interactive: respect color.diff for diff coloring
stash: pass --no-color to diff plumbing child processes
Diffstat (limited to 'builtin/stash.c')
| -rw-r--r-- | builtin/stash.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/builtin/stash.c b/builtin/stash.c index 1977e50df2..063208b9b4 100644 --- a/builtin/stash.c +++ b/builtin/stash.c @@ -377,7 +377,7 @@ static int diff_tree_binary(struct strbuf *out, struct object_id *w_commit) * however it should be done together with apply_cached. */ cp.git_cmd = 1; - strvec_pushl(&cp.args, "diff-tree", "--binary", NULL); + strvec_pushl(&cp.args, "diff-tree", "--binary", "--no-color", NULL); strvec_pushf(&cp.args, "%s^2^..%s^2", w_commit_hex, w_commit_hex); return pipe_command(&cp, NULL, 0, out, 0, NULL, 0); @@ -1283,6 +1283,7 @@ 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", "--binary", + "--no-color", "-U1", "HEAD", oid_to_hex(&info->w_tree), "--", NULL); if (pipe_command(&cp_diff_tree, NULL, 0, out_patch, 0, NULL, 0)) { ret = -1; @@ -1345,6 +1346,7 @@ static int stash_patch(struct stash_info *info, const struct pathspec *ps, cp_diff_tree.git_cmd = 1; strvec_pushl(&cp_diff_tree.args, "diff-tree", "-p", "-U1", "HEAD", + "--no-color", oid_to_hex(&info->w_tree), "--", NULL); if (pipe_command(&cp_diff_tree, NULL, 0, out_patch, 0, NULL, 0)) { ret = -1; @@ -1719,6 +1721,7 @@ static int do_push_stash(const struct pathspec *ps, const char *stash_msg, int q cp_diff.git_cmd = 1; strvec_pushl(&cp_diff.args, "diff-index", "-p", + "--no-color", "--cached", "--binary", "HEAD", "--", NULL); add_pathspecs(&cp_diff.args, ps); |
