summaryrefslogtreecommitdiff
path: root/diff-cache.c
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2005-04-28 23:42:27 (GMT)
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-28 23:42:27 (GMT)
commit40469ee9c6a6f4c85df5520ef719bba3d38a64f0 (patch)
treedc0b54b68c90574a689fef23c5ab26d165f3ee2e /diff-cache.c
parentcf9a113d3526c301b380fbd8a5d3b9d74d322c71 (diff)
downloadgit-40469ee9c6a6f4c85df5520ef719bba3d38a64f0.zip
git-40469ee9c6a6f4c85df5520ef719bba3d38a64f0.tar.gz
git-40469ee9c6a6f4c85df5520ef719bba3d38a64f0.tar.bz2
[PATCH] Rename and extend read_tree_with_tree_or_commit_sha1
This patch renames read_tree_with_tree_or_commit_sha1() to read_object_with_reference() and extends it to automatically dereference not just "commit" objects but "tag" objects. With this patch, you can say e.g.: ls-tree $tag read-tree -m $(merge-base $tag $HEAD) $tag $HEAD diff-cache $tag diff-tree $tag $HEAD Signed-off-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'diff-cache.c')
-rw-r--r--diff-cache.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/diff-cache.c b/diff-cache.c
index e365f71..899e373 100644
--- a/diff-cache.c
+++ b/diff-cache.c
@@ -180,7 +180,7 @@ int main(int argc, char **argv)
mark_merge_entries();
- tree = read_tree_with_tree_or_commit_sha1(tree_sha1, &size, 0);
+ tree = read_object_with_reference(tree_sha1, "tree", &size, 0);
if (!tree)
die("bad tree object %s", argv[1]);
if (read_tree(tree, size, 1))