git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexandre Vassalotti <alexandre@peadrop.com>
To: git@vger.kernel.org
Cc: Alexandre Vassalotti <alexandre@peadrop.com>
Subject: [PATCH] git-tag: Fix the main while loop exit condition.
Date: Thu, 28 Jun 2007 12:56:57 -0400	[thread overview]
Message-ID: <11830498172717-git-send-email-alexandre@peadrop.com> (raw)

This stop git-tag from emitting a "shift: can't shift that many"
error, when listing tags.

Signed-off-by: Alexandre Vassalotti <alexandre@peadrop.com>
---
 git-tag.sh |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/git-tag.sh b/git-tag.sh
index c840439..bc0d735 100755
--- a/git-tag.sh
+++ b/git-tag.sh
@@ -14,18 +14,20 @@ username=
 list=
 verify=
 LINES=0
-while case "$#" in 0) break ;; esac
-do
+while [ $# -ne 0 ]; do
     case "$1" in
     -a)
 	annotate=1
+	shift
 	;;
     -s)
 	annotate=1
 	signed=1
+	shift
 	;;
     -f)
 	force=1
+	shift
 	;;
     -n)
         case $2 in
@@ -36,6 +38,7 @@ do
 		[ -z "$LINES" ] && LINES=1 # 1 line is default when -n is used
 		;;
 	esac
+	shift
 	;;
     -l)
 	list=1
@@ -122,7 +125,6 @@ do
 	break
 	;;
     esac
-    shift
 done
 
 [ -n "$list" ] && exit 0
-- 
1.5.2.1.144.gabc40

             reply	other threads:[~2007-06-28 16:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-28 16:56 Alexandre Vassalotti [this message]
2007-06-29  0:01 ` [PATCH] git-tag: Fix the main while loop exit condition Junio C Hamano
2007-06-30  6:04   ` Sam Vilain

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=11830498172717-git-send-email-alexandre@peadrop.com \
    --to=alexandre@peadrop.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).