diff options
author | brian m. carlson <sandals@crustytoothpaste.net> | 2017-07-13 23:49:20 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-07-17 13:54:37 -0700 |
commit | cd73de47148c16760a62fa3f75cafe015ca764b2 (patch) | |
tree | 307e99cfba18e3b880af01bf9656a961298439fd /t/helper/test-submodule-config.c | |
parent | d1a35e5c93eb57abd1133a8c55ba961cc55268a6 (diff) | |
download | git-cd73de47148c16760a62fa3f75cafe015ca764b2.tar.gz |
submodule: convert submodule config lookup to use object_id
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/helper/test-submodule-config.c')
-rw-r--r-- | t/helper/test-submodule-config.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/t/helper/test-submodule-config.c b/t/helper/test-submodule-config.c index c6c57bba0d..e13fbcc1b5 100644 --- a/t/helper/test-submodule-config.c +++ b/t/helper/test-submodule-config.c @@ -41,7 +41,7 @@ int cmd_main(int argc, const char **argv) git_config(git_test_config, NULL); while (*arg) { - unsigned char commit_sha1[20]; + struct object_id commit_oid; const struct submodule *submodule; const char *commit; const char *path_or_name; @@ -50,14 +50,14 @@ int cmd_main(int argc, const char **argv) path_or_name = arg[1]; if (commit[0] == '\0') - hashclr(commit_sha1); - else if (get_sha1(commit, commit_sha1) < 0) + oidclr(&commit_oid); + else if (get_oid(commit, &commit_oid) < 0) die_usage(argc, argv, "Commit not found."); if (lookup_name) { - submodule = submodule_from_name(commit_sha1, path_or_name); + submodule = submodule_from_name(&commit_oid, path_or_name); } else - submodule = submodule_from_path(commit_sha1, path_or_name); + submodule = submodule_from_path(&commit_oid, path_or_name); if (!submodule) die_usage(argc, argv, "Submodule not found."); |