X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=diff-index.c;h=bbd873ba13306ed87f89ea5a4315bfe7ce794c7e;hb=5207234a68aebf1f7a6494f6197513b00c8a70f3;hp=0054883a5e18aaacc682bb8369c6f0376cf75306;hpb=5e80092f7e6db09a40a62e837ca3f74f0bc5ad73;p=git.git diff --git a/diff-index.c b/diff-index.c index 0054883a..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; @@ -116,7 +117,7 @@ static int diff_cache(struct cache_entry **ac, int entries, const char **pathspe /* We come here with ce pointing at stage 1 * (original tree) and ac[1] pointing at stage * 3 (unmerged). show-modified with - * report-mising set to false does not say the + * report-missing set to false does not say the * file is deleted but reports true if work * tree does not have it, in which case we * fall through to report the unmerged state. @@ -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);