summaryrefslogtreecommitdiff
path: root/tree-diff.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2012-08-27 18:54:28 (GMT)
committerJunio C Hamano <gitster@pobox.com>2012-08-27 18:54:28 (GMT)
commit3b753148b636be9dc821feebf85cd7f1739b07a1 (patch)
treee8b95caaf57039b797a844f429806df177a1bde4 /tree-diff.c
parentb9148c37637347cea7b448b57caeb2c58fe64979 (diff)
parentc479d14a80743b1cb86d77695607f4c81f7d8797 (diff)
downloadgit-3b753148b636be9dc821feebf85cd7f1739b07a1.zip
git-3b753148b636be9dc821feebf85cd7f1739b07a1.tar.gz
git-3b753148b636be9dc821feebf85cd7f1739b07a1.tar.bz2
Merge branch 'jk/maint-null-in-trees'
We do not want a link to 0{40} object stored anywhere in our objects. * jk/maint-null-in-trees: fsck: detect null sha1 in tree entries do not write null sha1s to on-disk index diff: do not use null sha1 as a sentinel value
Diffstat (limited to 'tree-diff.c')
-rw-r--r--tree-diff.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/tree-diff.c b/tree-diff.c
index f760740..ba01563 100644
--- a/tree-diff.c
+++ b/tree-diff.c
@@ -49,12 +49,12 @@ static int compare_tree_entry(struct tree_desc *t1, struct tree_desc *t2,
if (DIFF_OPT_TST(opt, RECURSIVE) && S_ISDIR(mode1)) {
if (DIFF_OPT_TST(opt, TREE_IN_RECURSIVE)) {
opt->change(opt, mode1, mode2,
- sha1, sha2, base->buf, 0, 0);
+ sha1, sha2, 1, 1, base->buf, 0, 0);
}
strbuf_addch(base, '/');
diff_tree_sha1(sha1, sha2, base->buf, opt);
} else {
- opt->change(opt, mode1, mode2, sha1, sha2, base->buf, 0, 0);
+ opt->change(opt, mode1, mode2, sha1, sha2, 1, 1, base->buf, 0, 0);
}
strbuf_setlen(base, old_baselen);
return 0;
@@ -100,7 +100,7 @@ static void show_entry(struct diff_options *opt, const char *prefix,
die("corrupt tree sha %s", sha1_to_hex(sha1));
if (DIFF_OPT_TST(opt, TREE_IN_RECURSIVE))
- opt->add_remove(opt, *prefix, mode, sha1, base->buf, 0);
+ opt->add_remove(opt, *prefix, mode, sha1, 1, base->buf, 0);
strbuf_addch(base, '/');
@@ -108,7 +108,7 @@ static void show_entry(struct diff_options *opt, const char *prefix,
show_tree(opt, prefix, &inner, base);
free(tree);
} else
- opt->add_remove(opt, prefix[0], mode, sha1, base->buf, 0);
+ opt->add_remove(opt, prefix[0], mode, sha1, 1, base->buf, 0);
strbuf_setlen(base, old_baselen);
}