summaryrefslogtreecommitdiff
path: root/builtin/submodule--helper.c
diff options
context:
space:
mode:
authorbrian m. carlson <sandals@crustytoothpaste.net>2017-10-15 22:06:55 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-10-16 02:05:50 (GMT)
commit0f2dc722dd01097d1e1c1dac43b2f57924594457 (patch)
treea8121caea164480b7dec0c9d069160d9797fc21d /builtin/submodule--helper.c
parent6ccac9eed56280f035d84605b4451ae1721a3100 (diff)
downloadgit-0f2dc722dd01097d1e1c1dac43b2f57924594457.zip
git-0f2dc722dd01097d1e1c1dac43b2f57924594457.tar.gz
git-0f2dc722dd01097d1e1c1dac43b2f57924594457.tar.bz2
refs: convert resolve_refdup and refs_resolve_refdup to struct object_id
All of the callers already pass the hash member of struct object_id, so update them to pass a pointer to the struct directly, This transformation was done with an update to declaration and definition and the following semantic patch: @@ expression E1, E2, E3, E4; @@ - resolve_refdup(E1, E2, E3.hash, E4) + resolve_refdup(E1, E2, &E3, E4) @@ expression E1, E2, E3, E4; @@ - resolve_refdup(E1, E2, E3->hash, E4) + resolve_refdup(E1, E2, E3, E4) Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/submodule--helper.c')
-rw-r--r--builtin/submodule--helper.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/submodule--helper.c b/builtin/submodule--helper.c
index 06ed02f..5946a7c 100644
--- a/builtin/submodule--helper.c
+++ b/builtin/submodule--helper.c
@@ -1144,7 +1144,7 @@ static int push_check(int argc, const char **argv, const char *prefix)
argv++;
argc--;
/* Get the submodule's head ref and determine if it is detached */
- head = resolve_refdup("HEAD", 0, head_oid.hash, NULL);
+ head = resolve_refdup("HEAD", 0, &head_oid, NULL);
if (!head)
die(_("Failed to resolve HEAD as a valid ref."));
if (!strcmp(head, "HEAD"))