aboutsummaryrefslogtreecommitdiffstats
path: root/diff-lib.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2020-07-06 22:09:17 -0700
committerJunio C Hamano <gitster@pobox.com>2020-07-06 22:09:17 -0700
commit0ac0947b1470b2157fd4c085a1fd0b207d94b40b (patch)
tree51c2bb419ef22e3ac3309ebe6523e422e403b90c /diff-lib.c
parentMerge branch 'js/default-branch-name' (diff)
parentdifftool -d: ensure that intent-to-add files are handled correctly (diff)
downloadgit-0ac0947b1470b2157fd4c085a1fd0b207d94b40b.tar.gz
git-0ac0947b1470b2157fd4c085a1fd0b207d94b40b.zip
Merge branch 'js/diff-files-i-t-a-fix-for-difftool'
"git difftool" has trouble dealing with paths added to the index with the intent-to-add bit. * js/diff-files-i-t-a-fix-for-difftool: difftool -d: ensure that intent-to-add files are handled correctly diff-files --raw: show correct post-image of intent-to-add files
Diffstat (limited to 'diff-lib.c')
-rw-r--r--diff-lib.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/diff-lib.c b/diff-lib.c
index 61812f48c2..25fd2dee19 100644
--- a/diff-lib.c
+++ b/diff-lib.c
@@ -220,8 +220,7 @@ int run_diff_files(struct rev_info *revs, unsigned int option)
} else if (revs->diffopt.ita_invisible_in_index &&
ce_intent_to_add(ce)) {
diff_addremove(&revs->diffopt, '+', ce->ce_mode,
- the_hash_algo->empty_tree, 0,
- ce->name, 0);
+ &null_oid, 0, ce->name, 0);
continue;
}