diff options
author | Junio C Hamano <gitster@pobox.com> | 2020-08-19 16:14:44 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-08-19 16:14:44 -0700 |
commit | b10a44e6b69509a09aaa51c8aa6379ab3ca4f3d7 (patch) | |
tree | 552577ae30224442c83e5717eec9dcd7615bdd6b | |
parent | Merge branch 'en/merge-tests' (diff) | |
parent | diff-lib: use worktree mode in diffs from i-t-a entries (diff) | |
download | tgif-b10a44e6b69509a09aaa51c8aa6379ab3ca4f3d7.tar.xz |
Merge branch 'rp/ita-diff-modefix'
"git diff [<tree-ish>] $path" for a $path that is marked with i-t-a
bit was not showing the mode bits from the working tree.
* rp/ita-diff-modefix:
diff-lib: use worktree mode in diffs from i-t-a entries
-rw-r--r-- | diff-lib.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/diff-lib.c b/diff-lib.c index 25fd2dee19..50521e2093 100644 --- a/diff-lib.c +++ b/diff-lib.c @@ -219,7 +219,8 @@ int run_diff_files(struct rev_info *revs, unsigned int option) continue; } else if (revs->diffopt.ita_invisible_in_index && ce_intent_to_add(ce)) { - diff_addremove(&revs->diffopt, '+', ce->ce_mode, + newmode = ce_mode_from_stat(ce, st.st_mode); + diff_addremove(&revs->diffopt, '+', newmode, &null_oid, 0, ce->name, 0); continue; } |