submodule.c: report the submodule that an error occurs in
[gitweb.git] / revision.c
index f4b1f725c29deb7ef520ba9e49389343380436dd..e5e527bcf256e0d062ffaae2a3d6ac2a1e7373d6 100644 (file)
@@ -1347,7 +1347,8 @@ void add_index_objects_to_pending(struct rev_info *revs, unsigned int flags)
                        continue; /* current index already taken care of */
 
                if (read_index_from(&istate,
-                                   worktree_git_path(wt, "index")) > 0)
+                                   worktree_git_path(wt, "index"),
+                                   get_worktree_git_dir(wt)) > 0)
                        do_add_index_objects_to_pending(revs, &istate);
                discard_index(&istate);
        }