From: Junio C Hamano Date: Wed, 13 Dec 2017 21:28:56 +0000 (-0800) Subject: Merge branch 'pc/submodule-helper' X-Git-Tag: v2.16.0-rc0~61 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/41a05ee3a67b08991b48309aa30b249febe9d6dc?hp=-c Merge branch 'pc/submodule-helper' A message fix. * pc/submodule-helper: submodule--helper.c: i18n: add a missing space in message --- 41a05ee3a67b08991b48309aa30b249febe9d6dc diff --combined builtin/submodule--helper.c index 2086f0eb08,8a0b955a5d..a5c4a8a694 --- a/builtin/submodule--helper.c +++ b/builtin/submodule--helper.c @@@ -27,8 -27,9 +27,8 @@@ typedef void (*each_submodule_fn)(cons static char *get_default_remote(void) { char *dest = NULL, *ret; - unsigned char sha1[20]; struct strbuf sb = STRBUF_INIT; - const char *refname = resolve_ref_unsafe("HEAD", 0, sha1, NULL); + const char *refname = resolve_ref_unsafe("HEAD", 0, NULL, NULL); if (!refname) die(_("No such ref: %s"), "HEAD"); @@@ -623,7 -624,7 +623,7 @@@ static void status_submodule(const cha if (refs_head_ref(get_submodule_ref_store(path), handle_submodule_head_ref, &oid)) - die(_("could not resolve HEAD ref inside the" + die(_("could not resolve HEAD ref inside the " "submodule '%s'"), path); print_status(flags, '+', path, &oid, displaypath); @@@ -1326,7 -1327,8 +1326,7 @@@ static const char *remote_submodule_bra return "master"; if (!strcmp(branch, ".")) { - unsigned char sha1[20]; - const char *refname = resolve_ref_unsafe("HEAD", 0, sha1, NULL); + const char *refname = resolve_ref_unsafe("HEAD", 0, NULL, NULL); if (!refname) die(_("No such ref: %s"), "HEAD"); @@@ -1382,7 -1384,7 +1382,7 @@@ static int push_check(int argc, const c 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")) @@@ -1425,7 -1427,6 +1425,7 @@@ break; die("HEAD does not match the named branch in the superproject"); } + /* fallthrough */ default: die("src refspec '%s' must name a ref", rs->src);