Merge branch 'jj/stash-reset-only-toplevel'

"git stash save" lost local changes to submodules, which has been
corrected.

* jj/stash-reset-only-toplevel:
  stash: avoid recursive hard reset on submodules
This commit is contained in:
Junio C Hamano
2019-10-18 11:40:49 +09:00
3 changed files with 43 additions and 3 deletions

View File

@ -1392,7 +1392,7 @@ static int do_push_stash(const struct pathspec *ps, const char *stash_msg, int q
struct child_process cp = CHILD_PROCESS_INIT;
cp.git_cmd = 1;
argv_array_pushl(&cp.args, "reset", "--hard", "-q",
NULL);
"--no-recurse-submodules", NULL);
if (run_command(&cp)) {
ret = -1;
goto done;