]> git.ipfire.org Git - thirdparty/git.git/blobdiff - builtin/check-attr.c
check-attr: move to the top of working tree when in non-bare repository
[thirdparty/git.git] / builtin / check-attr.c
index 075d01d30c58d40abb48ff820ba6f8d310f785d0..f29d6c33e90455a3e3c0d7d5f6316570f4f64c78 100644 (file)
@@ -94,6 +94,9 @@ int cmd_check_attr(int argc, const char **argv, const char *prefix)
        struct git_attr_check *check;
        int cnt, i, doubledash, filei;
 
+       if (!is_bare_repository())
+               setup_work_tree();
+
        git_config(git_default_config, NULL);
 
        argc = parse_options(argc, argv, prefix, check_attr_options,