Commit 57e4b1c6 authored by Junio C Hamano's avatar Junio C Hamano

Merge branch 'ws/rebase-p'

Code clean-up.

* ws/rebase-p:
  rebase: remove merges_option and a blank line
  rebase: remove unused code paths from git_rebase__interactive__preserve_merges
  rebase: remove unused code paths from git_rebase__interactive
  rebase: add and use git_rebase__interactive__preserve_merges
  rebase: extract functions out of git_rebase__interactive
  rebase: reindent function git_rebase__interactive
  rebase: update invocation of rebase dot-sourced scripts
  rebase-interactive: simplify pick_on_preserving_merges
parents d19e5565 f24cd418
......@@ -4,15 +4,6 @@
# Copyright (c) 2010 Junio C Hamano.
#
# The whole contents of this file is run by dot-sourcing it from
# inside a shell function. It used to be that "return"s we see
# below were not inside any function, and expected to return
# to the function that dot-sourced us.
#
# However, older (9.x) versions of FreeBSD /bin/sh misbehave on such a
# construct and continue to run the statements that follow such a "return".
# As a work-around, we introduce an extra layer of a function
# here, and immediately call it after defining it.
git_rebase__am () {
case "$action" in
......@@ -105,5 +96,3 @@ fi
move_to_original_branch
}
# ... and then we call the whole thing.
git_rebase__am
This diff is collapsed.
......@@ -104,15 +104,6 @@ finish_rb_merge () {
say All done.
}
# The whole contents of this file is run by dot-sourcing it from
# inside a shell function. It used to be that "return"s we see
# below were not inside any function, and expected to return
# to the function that dot-sourced us.
#
# However, older (9.x) versions of FreeBSD /bin/sh misbehave on such a
# construct and continue to run the statements that follow such a "return".
# As a work-around, we introduce an extra layer of a function
# here, and immediately call it after defining it.
git_rebase__merge () {
case "$action" in
......@@ -171,5 +162,3 @@ done
finish_rb_merge
}
# ... and then we call the whole thing.
git_rebase__merge
......@@ -197,6 +197,7 @@ run_specific_rebase () {
autosquash=
fi
. git-rebase--$type
git_rebase__$type${preserve_merges:+__preserve_merges}
ret=$?
if test $ret -eq 0
then
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment