commit - b1ec3986a7503e80e895f681e510f0312dfeacb7
commit + b25ae4fac533cee8ef2910097b465d81abeb755f
blob - 2bfc6de61c3f7af5a68e0bb6a04242cc62688b27
blob + e3f9b25018866888c25a81a14248c9a48d394d2e
--- lib/fileindex.c
+++ lib/fileindex.c
#include "got_lib_path.h"
#include "got_lib_fileindex.h"
+#include "got_lib_worktree.h"
struct got_fileindex {
struct got_fileindex_tree entries;
de = readdir(dir);
do {
if (strcmp(de->d_name, ".") == 0 ||
- strcmp(de->d_name, "..") == 0) {
+ strcmp(de->d_name, "..") == 0 ||
+ (path[0] == '\0' &&
+ strcmp(de->d_name, GOT_WORKTREE_GOT_DIR) == 0)) {
de = readdir(dir);
continue;
}
+
+
if (de && *ie) {
int cmp = cmp_entries((*ie)->path, path, path_len,
de->d_name);