git-completion: add "git stash"
[gitweb.git] / builtin-add.c
index 734547994f3a35e04fc7fdea10396c0c87bc6f0d..de5c108f8f5765e78c8ca15dcad58f3796015acc 100644 (file)
@@ -60,7 +60,7 @@ static void fill_directory(struct dir_struct *dir, const char **pathspec,
                path = git_path("info/exclude");
                if (!access(path, R_OK))
                        add_excludes_from_file(dir, path);
-               if (!access(excludes_file, R_OK))
+               if (excludes_file != NULL && !access(excludes_file, R_OK))
                        add_excludes_from_file(dir, excludes_file);
        }