Re: [PATCH v3] stash: avoid recursive hard reset on submodules

2019-10-12 Thread Jakob Jarmar
On Sat, Oct 12, 2019 at 10:46:36AM +0900, Junio C Hamano wrote: > > + git init sub && > > + ( > > + cd sub && > > + test_commit sub_file > > + ) && > > + git init main && > > + ( > > + cd main && > > + git submodule add ../sub && > > + tes

Re: [PATCH v3] stash: avoid recursive hard reset on submodules

2019-10-11 Thread Junio C Hamano
Jakob Jarmar writes: > diff --git a/t/t3906-stash-submodule.sh b/t/t3906-stash-submodule.sh > index d7219d6f8f..83106fa958 100755 > --- a/t/t3906-stash-submodule.sh > +++ b/t/t3906-stash-submodule.sh > @@ -1,6 +1,6 @@ > #!/bin/sh > > -test_description='stash apply can handle submodules' > +tes

[PATCH v3] stash: avoid recursive hard reset on submodules

2019-10-11 Thread Jakob Jarmar
git stash push does not recursively stash submodules, but if submodule.recurse is set, it may recursively reset --hard them. Having only the destructive action recurse is likely to be surprising behaviour, and unlikely to be desirable, so the easiest fix should be to ensure that the call to git res