Git development
 help / color / mirror / Atom feed
From: Jonas Fonseca <fonseca@diku.dk>
To: Petr Baudis <pasky@ucw.cz>
Cc: git@vger.kernel.org
Subject: [PATCH 2/3] cg-patch: Use optparse
Date: Tue, 7 Feb 2006 23:44:33 +0100	[thread overview]
Message-ID: <20060207224433.GB24790@diku.dk> (raw)

Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
---
commit 77defc166986330f4285db8faf206c1176a6c4ae
tree 293120fe428f40eab2422ed59d84e77aa1fa53a1
parent 5095aca7013d87ccdb08dad20a9fb93d7465d33d
author Jonas Fonseca <fonseca@diku.dk> Tue, 07 Feb 2006 23:07:32 +0100
committer Jonas Fonseca <fonseca@antimatter.localdomain> Tue, 07 Feb 2006 23:07:32 +0100

 cg-patch |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/cg-patch b/cg-patch
index 8be13be..90dfd30 100755
--- a/cg-patch
+++ b/cg-patch
@@ -70,10 +70,13 @@ redzone_border()
 
 
 reverse=
-if [ "${ARGS[0]}" = "-R" ]; then
-	reverse=1
-	shift
-fi
+while optparse; do
+	if optparse -R; then
+		reverse=1
+	else
+		optfail
+	fi
+done
 
 
 gonefile="$(mktemp -t gitapply.XXXXXX)"

-- 
Jonas Fonseca

                 reply	other threads:[~2006-02-07 22:45 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20060207224433.GB24790@diku.dk \
    --to=fonseca@diku.dk \
    --cc=git@vger.kernel.org \
    --cc=pasky@ucw.cz \
    /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