summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEd Maste <emaste@freebsd.org>2016-06-17 11:33:29 -0400
committerJunio C Hamano <gitster@pobox.com>2016-06-17 11:04:38 -0700
commit9b35cadc2c7660745264041317f5982e1dde3f88 (patch)
treeeb053bb1813ae762896d8585b626568201c415ef
parent765428699a5381f113d19974720bc91b5bfeaf1d (diff)
downloadgit-em/newer-freebsd-shells-are-fine-with-returns.tar.gz
rebase: update comment about FreeBSD /bin/shem/newer-freebsd-shells-are-fine-with-returns
Commit 9f50d32 introduced a fix for FreeBSD /bin/sh misbehaviour when dot-sourcing a file containing "return" statements outside of any function, from a function in another shell script. That issue affects FreeBSD 9.x, and is not present in the /bin/sh in FreeBSD 10.3 and later. Update the comment to clarify this. The example from 9f50d32's commit message produces the expected output on FreeBSD 10.3 and -CURRENT (the upcoming 11.0): % sh script1.sh only this line should show % Signed-off-by: Ed Maste <emaste@freebsd.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r--git-rebase--am.sh4
-rw-r--r--git-rebase--interactive.sh4
-rw-r--r--git-rebase--merge.sh4
3 files changed, 6 insertions, 6 deletions
diff --git a/git-rebase--am.sh b/git-rebase--am.sh
index 9ae898bc1d..375239341f 100644
--- a/git-rebase--am.sh
+++ b/git-rebase--am.sh
@@ -9,8 +9,8 @@
# below were not inside any function, and expected to return
# to the function that dot-sourced us.
#
-# However, FreeBSD /bin/sh misbehaves on such a construct and
-# continues to run the statements that follow such a "return".
+# 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 () {
diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh
index 0564ad41f2..56d99662f4 100644
--- a/git-rebase--interactive.sh
+++ b/git-rebase--interactive.sh
@@ -838,8 +838,8 @@ add_exec_commands () {
# below were not inside any function, and expected to return
# to the function that dot-sourced us.
#
-# However, FreeBSD /bin/sh misbehaves on such a construct and
-# continues to run the statements that follow such a "return".
+# 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__interactive () {
diff --git a/git-rebase--merge.sh b/git-rebase--merge.sh
index d3fb67d75b..327b575d84 100644
--- a/git-rebase--merge.sh
+++ b/git-rebase--merge.sh
@@ -107,8 +107,8 @@ finish_rb_merge () {
# below were not inside any function, and expected to return
# to the function that dot-sourced us.
#
-# However, FreeBSD /bin/sh misbehaves on such a construct and
-# continues to run the statements that follow such a "return".
+# 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 () {