index 01790ab27d25f63ea9f0816668a822d8f059664a..fa9f9021eafef09ddeaf61f21d577b7c53fa346a 100644 (file)
--- a/dir.c
+++ b/dir.c
ret = rmdir(path->buf);
return ret;
}
+
+void setup_standard_excludes(struct dir_struct *dir)
+{
+ const char *path;
+
+ dir->exclude_per_dir = ".gitignore";
+ path = git_path("info/exclude");
+ if (!access(path, R_OK))
+ add_excludes_from_file(dir, path);
+ if (excludes_file && !access(excludes_file, R_OK))
+ add_excludes_from_file(dir, excludes_file);
+}