summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorbrian m. carlson <sandals@crustytoothpaste.net>2018-03-12 02:27:51 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-03-14 16:23:50 (GMT)
commit916bc35b29af6e0f4f215dea9c84e4185de0fec4 (patch)
tree21f8318b909c7dc21129bad02d6adc7d46fbc705 /builtin
parent575042a04f671fa1a9cf9d5c21b30a2dadbe6c7e (diff)
downloadgit-916bc35b29af6e0f4f215dea9c84e4185de0fec4.zip
git-916bc35b29af6e0f4f215dea9c84e4185de0fec4.tar.gz
git-916bc35b29af6e0f4f215dea9c84e4185de0fec4.tar.bz2
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 'builtin')
-rw-r--r--builtin/rm.c2
-rw-r--r--builtin/update-index.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/builtin/rm.c b/builtin/rm.c
index 4a2fcca..974a7ef 100644
--- a/builtin/rm.c
+++ b/builtin/rm.c
@@ -178,7 +178,7 @@ static int check_local_mod(struct object_id *head, int index_only)
* way as changed from the HEAD.
*/
if (no_head
- || get_tree_entry(head->hash, name, oid.hash, &mode)
+ || get_tree_entry(head, name, &oid, &mode)
|| ce->ce_mode != create_ce_mode(mode)
|| oidcmp(&ce->oid, &oid))
staged_changes = 1;
diff --git a/builtin/update-index.c b/builtin/update-index.c
index 58d1c2d..9625d1e 100644
--- a/builtin/update-index.c
+++ b/builtin/update-index.c
@@ -592,7 +592,7 @@ static struct cache_entry *read_one_ent(const char *which,
int size;
struct cache_entry *ce;
- if (get_tree_entry(ent->hash, path, oid.hash, &mode)) {
+ if (get_tree_entry(ent, path, &oid, &mode)) {
if (which)
error("%s: not in %s branch.", path, which);
return NULL;