worktree: disallow adding same path multiple times
[gitweb.git] / read-cache.c
index c5fabc844aad68f60a30d0ff7498ff7e5d692a7a..7b1354d7590a70ecbd6e508bdd95eafd4793efcc 100644 (file)
@@ -1493,7 +1493,7 @@ int refresh_index(struct index_state *istate, unsigned int flags,
                if (ignore_submodules && S_ISGITLINK(ce->ce_mode))
                        continue;
 
-               if (pathspec && !ce_path_match(ce, pathspec, seen))
+               if (pathspec && !ce_path_match(&the_index, ce, pathspec, seen))
                        filtered = 1;
 
                if (ce_stage(ce)) {