reset: add test cases for "--keep" option
[gitweb.git] / builtin-check-attr.c
index 15a04b7179a09492764d43c16a3ec5ff7cdd1b61..3016d29caa610caf4618e9bc1684a532fd3a18a1 100644 (file)
@@ -69,8 +69,8 @@ int cmd_check_attr(int argc, const char **argv, const char *prefix)
        int cnt, i, doubledash;
        const char *errstr = NULL;
 
-       argc = parse_options(argc, argv, check_attr_options, check_attr_usage,
-               PARSE_OPT_KEEP_DASHDASH);
+       argc = parse_options(argc, argv, prefix, check_attr_options,
+                            check_attr_usage, PARSE_OPT_KEEP_DASHDASH);
        if (!argc)
                usage_with_options(check_attr_usage, check_attr_options);
 
@@ -106,7 +106,7 @@ int cmd_check_attr(int argc, const char **argv, const char *prefix)
                const char *name;
                struct git_attr *a;
                name = argv[i];
-               a = git_attr(name, strlen(name));
+               a = git_attr(name);
                if (!a)
                        return error("%s: not a valid attribute name", name);
                check[i].attr = a;