summaryrefslogtreecommitdiff
path: root/pathspec.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-12-17 11:47:35 -0800
committerJunio C Hamano <gitster@pobox.com>2013-12-17 12:02:44 -0800
commitad7044857660af7ffaaf8fbbccc77b817d1b938f (patch)
treeb77a7390dbbc1901e13d74c1738f327e5fa8154d /pathspec.c
parent14a9c5f261bcc436b80700076257f02af0beec68 (diff)
parent59556548230e617b837343c2c07e357e688e2ca4 (diff)
downloadgit-ad7044857660af7ffaaf8fbbccc77b817d1b938f.tar.gz
Merge branch 'cc/starts-n-ends-with'
Remove a few duplicate implementations of prefix/suffix comparison functions, and rename them to starts_with and ends_with. * cc/starts-n-ends-with: replace {pre,suf}fixcmp() with {starts,ends}_with() strbuf: introduce starts_with() and ends_with() builtin/remote: remove postfixcmp() and use suffixcmp() instead environment: normalize use of prefixcmp() by removing " != 0"
Diffstat (limited to 'pathspec.c')
-rw-r--r--pathspec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pathspec.c b/pathspec.c
index 87b3b82f1f..52d38a4b4f 100644
--- a/pathspec.c
+++ b/pathspec.c
@@ -154,7 +154,7 @@ static unsigned prefix_pathspec(struct pathspec_item *item,
magic |= pathspec_magic[i].bit;
break;
}
- if (!prefixcmp(copyfrom, "prefix:")) {
+ if (starts_with(copyfrom, "prefix:")) {
char *endptr;
pathspec_prefix = strtol(copyfrom + 7,
&endptr, 10);