mirror of
https://git.proxmox.com/git/libgit2
synced 2025-06-20 07:52:43 +00:00
Never consider submodules for stashing
This commit is contained in:
parent
ac316e7438
commit
4fe0b0b34b
@ -316,6 +316,8 @@ static int build_workdir_tree(
|
|||||||
struct cb_data data = {0};
|
struct cb_data data = {0};
|
||||||
int error;
|
int error;
|
||||||
|
|
||||||
|
opts.flags = GIT_DIFF_IGNORE_SUBMODULES;
|
||||||
|
|
||||||
if ((error = git_commit_tree(&b_tree, b_commit)) < 0)
|
if ((error = git_commit_tree(&b_tree, b_commit)) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
@ -474,12 +476,14 @@ static int ensure_there_are_changes_to_stash(
|
|||||||
git_status_options opts = GIT_STATUS_OPTIONS_INIT;
|
git_status_options opts = GIT_STATUS_OPTIONS_INIT;
|
||||||
|
|
||||||
opts.show = GIT_STATUS_SHOW_INDEX_AND_WORKDIR;
|
opts.show = GIT_STATUS_SHOW_INDEX_AND_WORKDIR;
|
||||||
|
opts.flags = GIT_STATUS_OPT_EXCLUDE_SUBMODULES;
|
||||||
|
|
||||||
if (include_untracked_files)
|
if (include_untracked_files)
|
||||||
opts.flags = GIT_STATUS_OPT_INCLUDE_UNTRACKED |
|
opts.flags |= GIT_STATUS_OPT_INCLUDE_UNTRACKED |
|
||||||
GIT_STATUS_OPT_RECURSE_UNTRACKED_DIRS;
|
GIT_STATUS_OPT_RECURSE_UNTRACKED_DIRS;
|
||||||
|
|
||||||
if (include_ignored_files)
|
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);
|
error = git_status_foreach_ext(repo, &opts, is_dirty_cb, NULL);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user