rebase: improve detection of rebase in progress
commit99de0640f2837d31f84d2889a770d936ae4394be
authorMartin von Zweigbergk <martin.von.zweigbergk@gmail.com>
Sun, 6 Feb 2011 18:43:34 +0000 (6 13:43 -0500)
committerJunio C Hamano <gitster@pobox.com>
Thu, 10 Feb 2011 22:08:08 +0000 (10 14:08 -0800)
tree35b988e22eae95102f04671bae0d288aa4324228
parentdc4a4b7387f2d7ac5ecce2f5feb2dfa85f378beb
rebase: improve detection of rebase in progress

Detect early on if a rebase is in progress and what type of rebase it
is (interactive, merge-based or am-based). This prepares for further
refactoring where am-based rebase will be dispatched to
git-rebase--am.sh and merge-based rebase will be dispatched to
git-rebase--merge.sh.

The idea is to use the same variables whether the type of rebase was
detected from rebase-apply/ or rebase-merge/ directories or from the
command line options. This will make the code more readable and will
later also make it easier to dispatch to the type-specific scripts.

Also show a consistent error message independent of the type of rebase
that was in progress and remove the obsolete wording about being in
the middle of a 'patch application', since that (an existing
"$GIT_DIR"/rebase-apply/applying) aborts 'git rebase' at an earlier
stage.

Signed-off-by: Martin von Zweigbergk <martin.von.zweigbergk@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-rebase.sh