* [PATCH] pull: Do not abuse 'break' inside a shell 'case'
@ 2014-06-11 8:47 Jacek Konieczny
2014-06-11 20:13 ` Junio C Hamano
0 siblings, 1 reply; 2+ messages in thread
From: Jacek Konieczny @ 2014-06-11 8:47 UTC (permalink / raw)
To: git; +Cc: David Aguilar, Junio C Hamano, Jacek Konieczny
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] pull: Do not abuse 'break' inside a shell 'case'
2014-06-11 8:47 [PATCH] pull: Do not abuse 'break' inside a shell 'case' Jacek Konieczny
@ 2014-06-11 20:13 ` Junio C Hamano
0 siblings, 0 replies; 2+ messages in thread
From: Junio C Hamano @ 2014-06-11 20:13 UTC (permalink / raw)
To: Jacek Konieczny; +Cc: git, David Aguilar
Jacek Konieczny <jajcus@jajcus.net> writes:
> 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>
> ---
Thanks for spotting; I cannot believe this somehow got through
unnoticed.
As this fixes b814da89 (pull: add pull.ff configuration,
2014-01-15), it will eventually have to go to both master for 2.1
and maint for 2.0.1.
> 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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-06-11 20:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-11 8:47 [PATCH] pull: Do not abuse 'break' inside a shell 'case' Jacek Konieczny
2014-06-11 20:13 ` Junio C Hamano
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).