X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=diff-index.c;h=bbd873ba13306ed87f89ea5a4315bfe7ce794c7e;hb=521698b1538fb3c9bd818ee98f2c17d2c80c9605;hp=87e10619830ba71654240d424f15cb6db8ac1d65;hpb=731043fd4d55b1561ebb5a53daa4b9ff6dfac046;p=git.git diff --git a/diff-index.c b/diff-index.c index 87e10619..bbd873ba 100644 --- a/diff-index.c +++ b/diff-index.c @@ -1,4 +1,5 @@ #include "cache.h" +#include "tree.h" #include "diff.h" static int cached_only = 0; @@ -174,8 +175,7 @@ int main(int argc, const char **argv) unsigned char sha1[20]; const char *prefix = setup_git_directory(); const char **pathspec = NULL; - void *tree; - unsigned long size; + struct tree *tree; int ret; int allow_options = 1; int i; @@ -233,10 +233,10 @@ int main(int argc, const char **argv) mark_merge_entries(); - tree = read_object_with_reference(sha1, "tree", &size, NULL); + tree = parse_tree_indirect(sha1); if (!tree) die("bad tree object %s", tree_name); - if (read_tree(tree, size, 1, pathspec)) + if (read_tree(tree, 1, pathspec)) die("unable to read tree object %s", tree_name); ret = diff_cache(active_cache, active_nr, pathspec);