Commit 129cadf9 by Edward Thomson

index: support `git_index_add_all` directories with force

When the contents of an entire new directory is ignored, and `FORCE` is
specified to `git_index_add_all`, ensure that we expand the entire file
list. By default, diff will coalesce a fully ignored folder into a
single diff entry; expand it.
parent 309befe4
......@@ -3509,7 +3509,8 @@ static int index_apply_to_wd_diff(git_index *index, int action, const git_strarr
GIT_DIFF_RECURSE_UNTRACKED_DIRS;
if (flags == GIT_INDEX_ADD_FORCE)
opts.flags |= GIT_DIFF_INCLUDE_IGNORED;
opts.flags |= GIT_DIFF_INCLUDE_IGNORED |
GIT_DIFF_RECURSE_IGNORED_DIRS;
}
if ((error = git_diff_index_to_workdir(&diff, repo, index, &opts)) < 0)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment