summaryrefslogtreecommitdiff
path: root/git-rebase.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-09-20 12:34:36 -0700
committerJunio C Hamano <gitster@pobox.com>2013-09-20 12:34:37 -0700
commitf26f250b442b57d0e6d9295bb98690ce70640759 (patch)
tree97cbfc19ead16946bc30b7f5f8c56290f6b199f8 /git-rebase.sh
parentb05fc49adc7fc288ce5b8eebb576b0142297982d (diff)
parent99855ddf4bd319cd06a0524e755ab1c1b7d39f3b (diff)
downloadgit-f26f250b442b57d0e6d9295bb98690ce70640759.tar.gz
Merge branch 'mm/rebase-continue-freebsd-WB'
Work around a bug in FreeBSD shell that caused a regression to "git rebase" in v1.8.4. May need to be later applied to 'maint'. * mm/rebase-continue-freebsd-WB: rebase: fix run_specific_rebase's use of "return" on FreeBSD
Diffstat (limited to 'git-rebase.sh')
-rwxr-xr-xgit-rebase.sh11
1 files changed, 10 insertions, 1 deletions
diff --git a/git-rebase.sh b/git-rebase.sh
index 8d7659a22c..226752fbff 100755
--- a/git-rebase.sh
+++ b/git-rebase.sh
@@ -167,13 +167,22 @@ You can run "git stash pop" or "git stash drop" at any time.
rm -rf "$state_dir"
}
-run_specific_rebase () {
+run_specific_rebase_internal () {
if [ "$interactive_rebase" = implied ]; then
GIT_EDITOR=:
export GIT_EDITOR
autosquash=
fi
+ # On FreeBSD, the shell's "return" returns from the current
+ # function, not from the current file inclusion.
+ # run_specific_rebase_internal has the file inclusion as a
+ # last statement, so POSIX and FreeBSD's return will do the
+ # same thing.
. git-rebase--$type
+}
+
+run_specific_rebase () {
+ run_specific_rebase_internal
ret=$?
if test $ret -eq 0
then