diff options
author | brian m. carlson <sandals@crustytoothpaste.net> | 2018-03-12 03:27:51 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-03-14 17:23:50 +0100 |
commit | 916bc35b29af6e0f4f215dea9c84e4185de0fec4 (patch) | |
tree | 21f8318b909c7dc21129bad02d6adc7d46fbc705 /match-trees.c | |
parent | streaming: convert istream internals to struct object_id (diff) | |
download | git-916bc35b29af6e0f4f215dea9c84e4185de0fec4.tar.xz git-916bc35b29af6e0f4f215dea9c84e4185de0fec4.zip |
tree-walk: convert tree entry functions to object_id
Convert get_tree_entry and find_tree_entry to take pointers to struct
object_id.
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'match-trees.c')
-rw-r--r-- | match-trees.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/match-trees.c b/match-trees.c index 0ca99d5162..10d6c39d47 100644 --- a/match-trees.c +++ b/match-trees.c @@ -269,7 +269,7 @@ void shift_tree(const struct object_id *hash1, if (!*del_prefix) return; - if (get_tree_entry(hash2->hash, del_prefix, shifted->hash, &mode)) + if (get_tree_entry(hash2, del_prefix, shifted, &mode)) die("cannot find path %s in tree %s", del_prefix, oid_to_hex(hash2)); return; @@ -296,12 +296,12 @@ void shift_tree_by(const struct object_id *hash1, unsigned candidate = 0; /* Can hash2 be a tree at shift_prefix in tree hash1? */ - if (!get_tree_entry(hash1->hash, shift_prefix, sub1.hash, &mode1) && + if (!get_tree_entry(hash1, shift_prefix, &sub1, &mode1) && S_ISDIR(mode1)) candidate |= 1; /* Can hash1 be a tree at shift_prefix in tree hash2? */ - if (!get_tree_entry(hash2->hash, shift_prefix, sub2.hash, &mode2) && + if (!get_tree_entry(hash2, shift_prefix, &sub2, &mode2) && S_ISDIR(mode2)) candidate |= 2; |