diff options
author | brian m. carlson <sandals@crustytoothpaste.net> | 2017-05-07 00:10:17 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-05-08 08:12:57 +0200 |
commit | 740ee055c6178fc2dd43c5ccfbd367c4c64d6e0d (patch) | |
tree | e0ce96e53ce7957480f693147ea9693a33c6a211 /revision.c | |
parent | builtin/reflog: convert tree_is_complete to take struct object_id (diff) | |
download | git-740ee055c6178fc2dd43c5ccfbd367c4c64d6e0d.tar.xz git-740ee055c6178fc2dd43c5ccfbd367c4c64d6e0d.zip |
Convert lookup_tree to struct object_id
Convert the lookup_tree function to take a pointer to struct object_id.
The commit was created with manual changes to tree.c, tree.h, and
object.c, plus the following semantic patch:
@@
@@
- lookup_tree(EMPTY_TREE_SHA1_BIN)
+ lookup_tree(&empty_tree_oid)
@@
expression E1;
@@
- lookup_tree(E1.hash)
+ lookup_tree(&E1)
@@
expression E1;
@@
- lookup_tree(E1->hash)
+ lookup_tree(E1)
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'revision.c')
-rw-r--r-- | revision.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/revision.c b/revision.c index db2de7a7a8..c2091b6de7 100644 --- a/revision.c +++ b/revision.c @@ -59,7 +59,7 @@ static void mark_tree_contents_uninteresting(struct tree *tree) while (tree_entry(&desc, &entry)) { switch (object_type(entry.mode)) { case OBJ_TREE: - mark_tree_uninteresting(lookup_tree(entry.oid->hash)); + mark_tree_uninteresting(lookup_tree(entry.oid)); break; case OBJ_BLOB: mark_blob_uninteresting(lookup_blob(entry.oid)); @@ -1249,7 +1249,7 @@ static void add_cache_tree(struct cache_tree *it, struct rev_info *revs, int i; if (it->entry_count >= 0) { - struct tree *tree = lookup_tree(it->oid.hash); + struct tree *tree = lookup_tree(&it->oid); add_pending_object_with_path(revs, &tree->object, "", 040000, path->buf); } |