From d3867f112c946b3b97694802744c4695f73a1d93 Mon Sep 17 00:00:00 2001 From: Markus Hitter Date: Sun, 4 Jun 2017 17:09:35 +0200 Subject: [PATCH] git-step-rebase: enable the rerere-mechanism. Git provides a mechanism to record conflict solutions done with one rebase and replaying that when rebasing another branch. That's what's Rerere is about. Unfortunately, a rebase still stops after resolving all conflicts with recordings, so convenience is a bit limited. If Rerere is disabled in a repo or there are no recorded solutions, this option has no effect. --- tools/git-step-rebase | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/git-step-rebase b/tools/git-step-rebase index 33eff41..22c8969 100755 --- a/tools/git-step-rebase +++ b/tools/git-step-rebase @@ -55,12 +55,12 @@ wait_count 5 while [ ${PARENTS} -ge 0 ]; do echo -e "Next: rebasing to \033[1m${BASE_BRANCH}~${PARENTS}\033[0m" sleep 1 - if ! git rebase --whitespace=fix ${BASE_BRANCH}~${PARENTS}; then + if ! git rebase --rerere-autoupdate --whitespace=fix ${BASE_BRANCH}~${PARENTS}; then echo echo "Standard rebase failed." echo "Trying again, this time ignoring whitespace ..." git rebase --abort - if ! git rebase -X ignore-all-space --whitespace=fix ${BASE_BRANCH}~${PARENTS}; then + if ! git rebase --rerere-autoupdate -X ignore-all-space --whitespace=fix ${BASE_BRANCH}~${PARENTS}; then exit fi fi