diff options
author | Edward Thomson <ethomson@microsoft.com> | 2015-05-20 18:22:17 -0400 |
---|---|---|
committer | Edward Thomson <ethomson@edwardthomson.com> | 2015-05-20 20:05:55 -0400 |
commit | fa9a969d80a44a1f6d4ef733be0223b94db1b213 (patch) | |
tree | 404b8526a7236f9fda2264c278cfadde5ff023d0 /src/index.c | |
parent | cd3f3c2844715b12583eb4d4a6129d3050f115a4 (diff) | |
download | libgit2-fa9a969d80a44a1f6d4ef733be0223b94db1b213.tar.gz |
index_add_all: include untracked files in new subdirs
Diffstat (limited to 'src/index.c')
-rw-r--r-- | src/index.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/index.c b/src/index.c index 8f0976d13..7c0e6cfbc 100644 --- a/src/index.c +++ b/src/index.c @@ -2683,7 +2683,10 @@ static int index_apply_to_wd_diff(git_index *index, int action, const git_strarr opts.flags = GIT_DIFF_INCLUDE_TYPECHANGE; if (action == INDEX_ACTION_ADDALL) { - opts.flags |= GIT_DIFF_INCLUDE_UNTRACKED | GIT_DIFF_RECURSE_IGNORED_DIRS; + opts.flags |= GIT_DIFF_INCLUDE_UNTRACKED | + GIT_DIFF_RECURSE_UNTRACKED_DIRS | + GIT_DIFF_RECURSE_IGNORED_DIRS; + if (flags == GIT_INDEX_ADD_FORCE) opts.flags |= GIT_DIFF_INCLUDE_IGNORED; } |