From 99d1a9861ae88595e7386c453b6b38573a8a570c Mon Sep 17 00:00:00 2001 From: "brian m. carlson" Date: Mon, 5 Sep 2016 20:07:52 +0000 Subject: cache: convert struct cache_entry to use struct object_id Convert struct cache_entry to use struct object_id by applying the following semantic patch and the object_id transforms from contrib, plus the actual change to the struct: @@ struct cache_entry E1; @@ - E1.sha1 + E1.oid.hash @@ struct cache_entry *E1; @@ - E1->sha1 + E1->oid.hash Signed-off-by: brian m. carlson Signed-off-by: Junio C Hamano --- builtin/submodule--helper.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'builtin/submodule--helper.c') diff --git a/builtin/submodule--helper.c b/builtin/submodule--helper.c index e79790f0bd..566cfdd760 100644 --- a/builtin/submodule--helper.c +++ b/builtin/submodule--helper.c @@ -296,7 +296,8 @@ static int module_list(int argc, const char **argv, const char *prefix) if (ce_stage(ce)) printf("%06o %s U\t", ce->ce_mode, sha1_to_hex(null_sha1)); else - printf("%06o %s %d\t", ce->ce_mode, sha1_to_hex(ce->sha1), ce_stage(ce)); + printf("%06o %s %d\t", ce->ce_mode, + oid_to_hex(&ce->oid), ce_stage(ce)); utf8_fprintf(stdout, "%s\n", ce->name); } @@ -683,7 +684,7 @@ static int prepare_to_clone_next_submodule(const struct cache_entry *ce, strbuf_reset(&sb); strbuf_addf(&sb, "%06o %s %d %d\t%s\n", ce->ce_mode, - sha1_to_hex(ce->sha1), ce_stage(ce), + oid_to_hex(&ce->oid), ce_stage(ce), needs_cloning, ce->name); string_list_append(&suc->projectlines, sb.buf); -- cgit v1.2.3