X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;ds=sidebyside;f=diff-tree.c;h=c689c61c6865f2c66eacdd75e23ef1626eed6f7f;hb=ed4eeaf203d0f293bd5ffc2a0ad8711f052db1f3;hp=5a1ad34652fcda63a37c3aeb55c0231f1be69bdd;hpb=3a663fd9842aaa9e232ab43a811d11f1d7f0b7bc;p=git.git diff --git a/diff-tree.c b/diff-tree.c index 5a1ad346..c689c61c 100644 --- a/diff-tree.c +++ b/diff-tree.c @@ -238,10 +238,10 @@ static int diff_tree_sha1(const unsigned char *old, const unsigned char *new, co unsigned long size1, size2; int retval; - tree1 = read_tree_with_tree_or_commit_sha1(old, &size1, 0); + tree1 = read_object_with_reference(old, "tree", &size1, 0); if (!tree1) die("unable to read source tree (%s)", sha1_to_hex(old)); - tree2 = read_tree_with_tree_or_commit_sha1(new, &size2, 0); + tree2 = read_object_with_reference(new, "tree", &size2, 0); if (!tree2) die("unable to read destination tree (%s)", sha1_to_hex(new)); retval = diff_tree(tree1, size1, tree2, size2, base); @@ -250,7 +250,7 @@ static int diff_tree_sha1(const unsigned char *old, const unsigned char *new, co return retval; } -static char *diff_tree_usage = "diff-tree [-r] [-z] "; +static char *diff_tree_usage = "diff-tree [-p] [-r] [-z] "; int main(int argc, char **argv) { @@ -279,7 +279,7 @@ int main(int argc, char **argv) usage(diff_tree_usage); } - if (argc < 3 || get_sha1_hex(argv[1], old) || get_sha1_hex(argv[2], new)) + if (argc < 3 || get_sha1(argv[1], old) || get_sha1(argv[2], new)) usage(diff_tree_usage); if (argc > 3) {