diff options
author | Vicent Martà <vicent@github.com> | 2013-09-30 14:57:48 -0700 |
---|---|---|
committer | Vicent Martà <vicent@github.com> | 2013-09-30 14:57:48 -0700 |
commit | 9acde16266cbdf1df35be71b39ae9a0a6206cf2d (patch) | |
tree | 4ee6fdb93a4beaf45687cf28b1b7b12c5ed908ad /src | |
parent | dc56fea7a3fb9a7437b6b4d3302188b4189c70e9 (diff) | |
parent | ae5a935290c695d721f69b8836f891a639c0aff3 (diff) | |
download | libgit2-9acde16266cbdf1df35be71b39ae9a0a6206cf2d.tar.gz |
Merge pull request #1881 from libgit2/ignore-submodules-in-stash
Never consider submodules for stashing
Diffstat (limited to 'src')
-rw-r--r-- | src/stash.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/stash.c b/src/stash.c index ab4a68575..7742eee19 100644 --- a/src/stash.c +++ b/src/stash.c @@ -316,6 +316,8 @@ static int build_workdir_tree( struct cb_data data = {0}; int error; + opts.flags = GIT_DIFF_IGNORE_SUBMODULES; + if ((error = git_commit_tree(&b_tree, b_commit)) < 0) goto cleanup; @@ -474,12 +476,14 @@ static int ensure_there_are_changes_to_stash( git_status_options opts = GIT_STATUS_OPTIONS_INIT; opts.show = GIT_STATUS_SHOW_INDEX_AND_WORKDIR; + opts.flags = GIT_STATUS_OPT_EXCLUDE_SUBMODULES; + if (include_untracked_files) - opts.flags = GIT_STATUS_OPT_INCLUDE_UNTRACKED | + opts.flags |= GIT_STATUS_OPT_INCLUDE_UNTRACKED | GIT_STATUS_OPT_RECURSE_UNTRACKED_DIRS; if (include_ignored_files) - opts.flags = GIT_STATUS_OPT_INCLUDE_IGNORED; + opts.flags |= GIT_STATUS_OPT_INCLUDE_IGNORED; error = git_status_foreach_ext(repo, &opts, is_dirty_cb, NULL); |