Skip to content

Commit 437ce60

Browse files
committed
Merge branch 'mm/rebase-continue-freebsd-WB' into maint
* mm/rebase-continue-freebsd-WB: rebase: fix run_specific_rebase's use of "return" on FreeBSD
2 parents 76deaab + 99855dd commit 437ce60

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

git-rebase.sh

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,13 +167,22 @@ You can run "git stash pop" or "git stash drop" at any time.
167167
rm -rf "$state_dir"
168168
}
169169

170-
run_specific_rebase () {
170+
run_specific_rebase_internal () {
171171
if [ "$interactive_rebase" = implied ]; then
172172
GIT_EDITOR=:
173173
export GIT_EDITOR
174174
autosquash=
175175
fi
176+
# On FreeBSD, the shell's "return" returns from the current
177+
# function, not from the current file inclusion.
178+
# run_specific_rebase_internal has the file inclusion as a
179+
# last statement, so POSIX and FreeBSD's return will do the
180+
# same thing.
176181
. git-rebase--$type
182+
}
183+
184+
run_specific_rebase () {
185+
run_specific_rebase_internal
177186
ret=$?
178187
if test $ret -eq 0
179188
then

0 commit comments

Comments
 (0)