git-svn: add Git::SVN module (to avoid global variables)
[gitweb.git] / builtin-grep.c
index 2bfbdb71407dcd0ddfe970f6a614158d954cd4c0..f35f2d023cf56cb3c75c817455cfc53a98175f54 100644 (file)
@@ -527,9 +527,9 @@ int cmd_grep(int argc, const char **argv, const char *prefix)
                        opt.word_regexp = 1;
                        continue;
                }
-               if (!strncmp("-A", arg, 2) ||
-                   !strncmp("-B", arg, 2) ||
-                   !strncmp("-C", arg, 2) ||
+               if (!prefixcmp(arg, "-A") ||
+                   !prefixcmp(arg, "-B") ||
+                   !prefixcmp(arg, "-C") ||
                    (arg[0] == '-' && '1' <= arg[1] && arg[1] <= '9')) {
                        unsigned num;
                        const char *scan;