From: Christian Couder <chriscool@tuxfamily.org>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, Avery Pennarun <apenwarr@gmail.com>,
Johannes Schindelin <Johannes.Schindelin@gmx.de>,
Jonathan Nieder <jrnieder@gmail.com>, Jeff King <peff@peff.net>,
Max Horn <max@quendi.de>, Andreas Ericsson <ae@op5.se>
Subject: [PATCH v2 40/86] environment: replace prefixcmp() with starts_with()
Date: Sun, 17 Nov 2013 23:06:32 +0100 [thread overview]
Message-ID: <20131117220719.4386.73779.chriscool@tuxfamily.org> (raw)
In-Reply-To: <20131117215732.4386.19345.chriscool@tuxfamily.org>
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
---
environment.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/environment.c b/environment.c
index 378254c..1270278 100644
--- a/environment.c
+++ b/environment.c
@@ -176,7 +176,7 @@ const char *get_git_namespace(void)
const char *strip_namespace(const char *namespaced_ref)
{
- if (prefixcmp(namespaced_ref, get_git_namespace()) != 0)
+ if (!starts_with(namespaced_ref, get_git_namespace()))
return NULL;
return namespaced_ref + namespace_len;
}
--
1.8.4.1.561.g12affca
next prev parent reply other threads:[~2013-11-19 21:05 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-17 22:05 [PATCH v2 00/86] replace prefixcmp() with starts_with() Christian Couder
2013-11-17 22:05 ` [PATCH v2 01/86] strbuf: add starts_with() to be used instead of prefixcmp() Christian Couder
2013-11-17 22:05 ` [PATCH v2 02/86] diff: replace prefixcmp() with starts_with() Christian Couder
2013-11-17 22:06 ` [PATCH v2 08/86] transport*: " Christian Couder
2013-11-17 22:06 ` Christian Couder [this message]
2013-11-17 22:07 ` [PATCH v2 86/86] strbuf: remove prefixcmp() as it has been replaced " Christian Couder
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20131117220719.4386.73779.chriscool@tuxfamily.org \
--to=chriscool@tuxfamily.org \
--cc=Johannes.Schindelin@gmx.de \
--cc=ae@op5.se \
--cc=apenwarr@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jrnieder@gmail.com \
--cc=max@quendi.de \
--cc=peff@peff.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).