summaryrefslogtreecommitdiff
path: root/sha1_file.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2016-09-12 15:34:31 -0700
committerJunio C Hamano <gitster@pobox.com>2016-09-12 15:34:31 -0700
commit305d7f133956a5f43c94d938beabbfbb0ac1753c (patch)
tree6f3324895e1885de1a7369da012c5132b9104176 /sha1_file.c
parentcda1bbd474805e653dda8a71d4ea3790e2a66cbb (diff)
parentfd47ae6a5b9cc0cfc56c1f7c43db612d26ca4b75 (diff)
downloadgit-305d7f133956a5f43c94d938beabbfbb0ac1753c.tar.gz
Merge branch 'jk/diff-submodule-diff-inline'
The "git diff --submodule={short,log}" mechanism has been enhanced to allow "--submodule=diff" to show the patch between the submodule commits bound to the superproject. * jk/diff-submodule-diff-inline: diff: teach diff to display submodule difference with an inline diff submodule: refactor show_submodule_summary with helper function submodule: convert show_submodule_summary to use struct object_id * allow do_submodule_path to work even if submodule isn't checked out diff: prepare for additional submodule formats graph: add support for --line-prefix on all graph-aware output diff.c: remove output_prefix_length field cache: add empty_tree_oid object and helper function
Diffstat (limited to 'sha1_file.c')
-rw-r--r--sha1_file.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sha1_file.c b/sha1_file.c
index 6f38dc6548..472ccb2ff9 100644
--- a/sha1_file.c
+++ b/sha1_file.c
@@ -39,6 +39,12 @@ static inline uintmax_t sz_fmt(size_t s) { return s; }
const unsigned char null_sha1[20];
const struct object_id null_oid;
+const struct object_id empty_tree_oid = {
+ EMPTY_TREE_SHA1_BIN_LITERAL
+};
+const struct object_id empty_blob_oid = {
+ EMPTY_BLOB_SHA1_BIN_LITERAL
+};
/*
* This is meant to hold a *small* number of objects that you would