diff options
author | Jacques Germishuys <jacquesg@striata.com> | 2014-09-24 13:24:39 +0200 |
---|---|---|
committer | Jacques Germishuys <jacquesg@striata.com> | 2014-09-26 13:11:49 +0200 |
commit | 7b7aa75f8047e99fa84d2351785e990ba6cc131c (patch) | |
tree | 486b50d4a2a284f5f432160b7e260e0a9f4739b2 | |
parent | 940da5486109d7641c1740955b7fa6334bcda922 (diff) | |
download | libgit2-7b7aa75f8047e99fa84d2351785e990ba6cc131c.tar.gz |
Recurse ignored directories when stashing
-rw-r--r-- | src/stash.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/stash.c b/src/stash.c index 22f756e35..caffd0cea 100644 --- a/src/stash.c +++ b/src/stash.c @@ -232,7 +232,8 @@ static int build_untracked_tree( } if (flags & GIT_STASH_INCLUDE_IGNORED) { - opts.flags |= GIT_DIFF_INCLUDE_IGNORED; + opts.flags |= GIT_DIFF_INCLUDE_IGNORED | + GIT_DIFF_RECURSE_IGNORED_DIRS; data.include_ignored = true; } @@ -447,10 +448,11 @@ static int ensure_there_are_changes_to_stash( if (include_untracked_files) opts.flags |= GIT_STATUS_OPT_INCLUDE_UNTRACKED | - GIT_STATUS_OPT_RECURSE_UNTRACKED_DIRS; + GIT_STATUS_OPT_RECURSE_UNTRACKED_DIRS; if (include_ignored_files) - opts.flags |= GIT_STATUS_OPT_INCLUDE_IGNORED; + opts.flags |= GIT_STATUS_OPT_INCLUDE_IGNORED | + GIT_STATUS_OPT_RECURSE_IGNORED_DIRS; error = git_status_foreach_ext(repo, &opts, is_dirty_cb, NULL); |