path: root/builtin/clean.c
diff options
authorChristian Couder <>2013-11-30 20:55:40 (GMT)
committerJunio C Hamano <>2013-12-05 22:13:21 (GMT)
commit59556548230e617b837343c2c07e357e688e2ca4 (patch)
tree5e66894c3d666f0fdc39aaf79de554dfeb7d0e36 /builtin/clean.c
parent956623157f828b2b4fd91a9bc5e78ba8e42437d9 (diff)
replace {pre,suf}fixcmp() with {starts,ends}_with()
Leaving only the function definitions and declarations so that any new topic in flight can still make use of the old functions, replace existing uses of the prefixcmp() and suffixcmp() with new API functions. The change can be recreated by mechanically applying this: $ git grep -l -e prefixcmp -e suffixcmp -- \*.c | grep -v strbuf\\.c | xargs perl -pi -e ' s|!prefixcmp\(|starts_with\(|g; s|prefixcmp\(|!starts_with\(|g; s|!suffixcmp\(|ends_with\(|g; s|suffixcmp\(|!ends_with\(|g; ' on the result of preparatory changes in this series. Signed-off-by: Christian Couder <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'builtin/clean.c')
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin/clean.c b/builtin/clean.c
index 615cd57..2f26297 100644
--- a/builtin/clean.c
+++ b/builtin/clean.c
@@ -100,7 +100,7 @@ static int parse_clean_color_slot(const char *var)
static int git_clean_config(const char *var, const char *value, void *cb)
- if (!prefixcmp(var, "column."))
+ if (starts_with(var, "column."))
return git_column_config(var, value, "clean", &colopts);
/* honors the color.interactive* config variables which also
@@ -109,7 +109,7 @@ static int git_clean_config(const char *var, const char *value, void *cb)
clean_use_color = git_config_colorbool(var, value);
return 0;
- if (!prefixcmp(var, "color.interactive.")) {
+ if (starts_with(var, "color.interactive.")) {
int slot = parse_clean_color_slot(var +
if (slot < 0)