git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH 0/2] Demonstrate and fix a rebase --autostash bug with dirty submodules
@ 2018-10-23 19:57 Johannes Schindelin via GitGitGadget
  2018-10-23 19:57 ` [PATCH 1/2] rebase --autostash: demonstrate a problem " Johannes Schindelin via GitGitGadget
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Johannes Schindelin via GitGitGadget @ 2018-10-23 19:57 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano

This bug report came in via Git for Windows (already with version 2.19.0,
but I misread the reporter's enthusiasm to take matters into his own hands).

The culprit is, in a nutshell, that the built-in rebase tries to run git
stash only when the worktree is dirty, but it includes submodules in that.
However, git stash cannot do anything about submodules, and if the only
changes are in submodules, then it won't even give us back an OID, and the
built-in rebase acts surprised.

The solution is easy: simply exclude the submodules from the question
whether the worktree is dirty.

What is surprisingly not simple is to get the regression test right. For
that reason, and because I firmly believe that it is easier to verify a fix
for a regression when the regression test is introduced separately (i.e.
making it simple to verify that there is a regression), I really want to
keep the first patch separate from the second one.

Since this bug concerns the built-in rebase, I based the patches on top of 
next.

Johannes Schindelin (2):
  rebase --autostash: demonstrate a problem with dirty submodules
  rebase --autostash: fix issue with dirty submodules

 builtin/rebase.c            |  2 +-
 t/t3420-rebase-autostash.sh | 10 ++++++++++
 2 files changed, 11 insertions(+), 1 deletion(-)


base-commit: 209f214ca4ae4e301fc32e59ab26f937082f3ea3
Published-As: https://github.com/gitgitgadget/git/releases/tags/pr-56%2Fdscho%2Ffix-built-in-rebase-autostash-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-56/dscho/fix-built-in-rebase-autostash-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/56
-- 
gitgitgadget

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-11-07 13:50 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-23 19:57 [PATCH 0/2] Demonstrate and fix a rebase --autostash bug with dirty submodules Johannes Schindelin via GitGitGadget
2018-10-23 19:57 ` [PATCH 1/2] rebase --autostash: demonstrate a problem " Johannes Schindelin via GitGitGadget
2018-10-23 19:57 ` [PATCH 2/2] rebase --autostash: fix issue " Johannes Schindelin via GitGitGadget
2018-11-06 13:59 ` Regression in rebase-in-C with rebase.autoStash=true Ævar Arnfjörð Bjarmason
2018-11-06 19:32   ` Jeff King
2018-11-07 13:50   ` Johannes Schindelin

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).