sha1-name.c: remove implicit dependency on the_index
[gitweb.git] / builtin / check-attr.c
index f7b59993d3a10952921204bbaaf4d4bf349191c5..30a2f84274d32977769f778d5704accb599cf0e7 100644 (file)
@@ -65,8 +65,7 @@ static void check_attr(const char *prefix,
        if (collect_all) {
                git_all_attrs(&the_index, full_path, check);
        } else {
-               if (git_check_attr(&the_index, full_path, check))
-                       die("git_check_attr died");
+               git_check_attr(&the_index, full_path, check);
        }
        output_attr(check, file);
 
@@ -120,7 +119,7 @@ int cmd_check_attr(int argc, const char **argv, const char *prefix)
        }
 
        if (cached_attrs)
-               git_attr_set_direction(GIT_ATTR_INDEX, NULL);
+               git_attr_set_direction(GIT_ATTR_INDEX);
 
        doubledash = -1;
        for (i = 0; doubledash < 0 && i < argc; i++) {