git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Ramkumar Ramachandra <artagnon@gmail.com>
Date
Jun 14, 2013, 08:56 UTC
Message-ID
<1371200178-9927-3-git-send-email-artagnon@gmail.com>
In-Reply-To
<1371200178-9927-1-git-send-email-artagnon@gmail.com>

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 <artagnon@gmail.com>
---
 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
Previous: Ramkumar RamachandraNext: Matthieu Moy
Message 12 of 14 in “Rebasing pull with autostash”
  1. 0/2 Rebasing pull with autostashRamkumar Ramachandra, Jun 14, 2013
  2. 1/2 pull: respect rebase.autostashRamkumar Ramachandra, Jun 14, 2013
  3. Matthieu MoyJun 14, 2013
  4. Ramkumar RamachandraJun 14, 2013
  5. Phil HordJun 14, 2013
  6. Junio C HamanoJun 14, 2013
  7. Phil HordJun 14, 2013
  8. Phil HordJun 14, 2013
  9. John KeepingJun 14, 2013
  10. Phil HordJun 14, 2013
  11. Ramkumar RamachandraJun 14, 2013
  12. 2/2 pull: clarify the large && { ... } formRamkumar Ramachandra, Jun 14, 2013
  13. Matthieu MoyJun 14, 2013
  14. Ramkumar RamachandraJun 14, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.