From: Christian Couder Date: Sat, 09 Nov 2013 07:06:43 GMT Subject: [PATCH 50/86] builtin/clone: replace prefixcmd() with has_prefix() Message-ID: <20131109070720.18178.10765.chriscool@tuxfamily.org> In-Reply-To: <20131109070358.18178.40248.chriscool@tuxfamily.org> Signed-off-by: Christian Couder --- builtin/clone.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/builtin/clone.c b/builtin/clone.c index 84fb1bd..49b7a08 100644 --- a/builtin/clone.c +++ b/builtin/clone.c @@ -508,7 +508,7 @@ static void write_followtags(const struct ref *refs, const char *msg) { const struct ref *ref; for (ref = refs; ref; ref = ref->next) { - if (prefixcmp(ref->name, "refs/tags/")) + if (!has_prefix(ref->name, "refs/tags/")) continue; if (has_suffix(ref->name, "^{}")) continue; @@ -578,7 +578,7 @@ static void update_remote_refs(const struct ref *refs, static void update_head(const struct ref *our, const struct ref *remote, const char *msg) { - if (our && !prefixcmp(our->name, "refs/heads/")) { + if (our && has_prefix(our->name, "refs/heads/")) { /* Local default branch link */ create_symref("HEAD", our->name, NULL); if (!option_bare) { @@ -625,7 +625,7 @@ static int checkout(void) if (advice_detached_head) detach_advice(sha1_to_hex(sha1)); } else { - if (prefixcmp(head, "refs/heads/")) + if (!has_prefix(head, "refs/heads/")) die(_("HEAD not found below refs/heads!")); } free(head); -- 1.8.4.1.566.geca833c