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"
This commit is contained in:
@ -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);
|
||||
|
||||
Reference in New Issue
Block a user