Skip to content

Commit b10a44e

Browse files
committed
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
2 parents 36d225c + cb0dd22 commit b10a44e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

diff-lib.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,8 @@ int run_diff_files(struct rev_info *revs, unsigned int option)
219219
continue;
220220
} else if (revs->diffopt.ita_invisible_in_index &&
221221
ce_intent_to_add(ce)) {
222-
diff_addremove(&revs->diffopt, '+', ce->ce_mode,
222+
newmode = ce_mode_from_stat(ce, st.st_mode);
223+
diff_addremove(&revs->diffopt, '+', newmode,
223224
&null_oid, 0, ce->name, 0);
224225
continue;
225226
}

0 commit comments

Comments
 (0)