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

[PATCH] pull: Do not abuse 'break' inside a shell 'case'

From
JKJacek Konieczny <jajcus@jajcus.net>
Date
Jun 11, 2014, 08:47 UTC
Message-ID
<1402476465-27177-1-git-send-email-jajcus@jajcus.net>
It is not C. The code would break under mksh when 'pull.ff' is set:
  $ git pull
  /usr/lib/git-core/git-pull[67]: break: can't break
  Already up-to-date.
Signed-off-by: Jacek Konieczny <jajcus@jajcus.net>
---
 git-pull.sh | 2 --
 1 file changed, 2 deletions(-)
diff --git a/git-pull.sh b/git-pull.sh
index 6cd8ebc..7358fac 100755
--- a/git-pull.sh
+++ b/git-pull.sh
@@ -58,11 +58,9 @@ pull_ff=$(git config pull.ff)
 case "$pull_ff" in
 false)
 	no_ff=--no-ff
-	break
 	;;
 only)
 	ff_only=--ff-only
-	break
 	;;
 esac
 
-- 
2.0.0
Next: Junio C Hamano
Message 1 of 2 in “pull: Do not abuse 'break' inside a shell 'case'”
  1. pull: Do not abuse 'break' inside a shell 'case'Jacek Konieczny, Jun 11, 2014
  2. Junio C HamanoJun 11, 2014

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.