summaryrefslogtreecommitdiff
path: root/builtin/checkout.c
diff options
context:
space:
mode:
authorbrian m. carlson <sandals@crustytoothpaste.net>2018-03-12 02:27:26 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-03-14 16:23:47 (GMT)
commitdf46d77e00e7bbcfe46cc06c071fa5284f96c327 (patch)
tree01b7e694bd31454103afc694559dc7a34967b899 /builtin/checkout.c
parent5ac913c6eb266e836f91c39c3b03bcbdc06475c6 (diff)
downloadgit-df46d77e00e7bbcfe46cc06c071fa5284f96c327.zip
git-df46d77e00e7bbcfe46cc06c071fa5284f96c327.tar.gz
git-df46d77e00e7bbcfe46cc06c071fa5284f96c327.tar.bz2
tree: convert read_tree_recursive to struct object_id
Convert the callback functions for read_tree_recursive to take a pointer 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/checkout.c')
-rw-r--r--builtin/checkout.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin/checkout.c b/builtin/checkout.c
index 8f4dfb1..8eb1182 100644
--- a/builtin/checkout.c
+++ b/builtin/checkout.c
@@ -66,7 +66,7 @@ static int post_checkout_hook(struct commit *old_commit, struct commit *new_comm
}
-static int update_some(const unsigned char *sha1, struct strbuf *base,
+static int update_some(const struct object_id *oid, struct strbuf *base,
const char *pathname, unsigned mode, int stage, void *context)
{
int len;
@@ -78,7 +78,7 @@ static int update_some(const unsigned char *sha1, struct strbuf *base,
len = base->len + strlen(pathname);
ce = xcalloc(1, cache_entry_size(len));
- hashcpy(ce->oid.hash, sha1);
+ oidcpy(&ce->oid, oid);
memcpy(ce->name, base->buf, base->len);
memcpy(ce->name + base->len, pathname, len - base->len);
ce->ce_flags = create_ce_flags(0) | CE_UPDATE;