Thread (8 messages) flat view 8 messages, 3 authors, 2016-06-15
DORMANTno replies

[PATCH 2/2] pull: clarify the large && { ... } form

From: Ramkumar Ramachandra <hidden>
Date: 2016-06-15 22:57:44
Subsystem: the rest · Maintainer: Linus Torvalds

Remove the large && { ... } form, as the block can be confused with a
function block.  Use a simple if-condition instead.  No functional
changes.

Signed-off-by: Ramkumar Ramachandra <redacted>
---
 git-pull.sh | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/git-pull.sh b/git-pull.sh
index fb01763..babf009 100755
--- a/git-pull.sh
+++ b/git-pull.sh
@@ -195,7 +195,7 @@ error_on_no_merge_candidates () {
 	exit 1
 }
 
-test true = "$rebase" && {
+if test true = "$rebase"; then
 	if ! git rev-parse -q --verify HEAD >/dev/null
 	then
 		# On an unborn branch
@@ -220,7 +220,8 @@ test true = "$rebase" && {
 			break
 		fi
 	done
-}
+fi
+
 orig_head=$(git rev-parse -q --verify HEAD)
 git fetch $verbosity $progress $dry_run $recurse_submodules --update-head-ok "$@" || exit 1
 test -z "$dry_run" || exit 0
-- 
1.8.3.1.379.gb74074e.dirty
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help