From: Alex Riesen <raa.lkml@gmail.com>
To: "SZEDER Gábor" <szeder@ira.uka.de>
Cc: Junio C Hamano <gitster@pobox.com>, git@vger.kernel.org
Subject: [PATCH] Use "=" instead of "==" in condition as it is more portable
Date: Mon, 28 Apr 2008 23:09:55 +0200 [thread overview]
Message-ID: <20080428210955.GB10600@steel.home> (raw)
In-Reply-To: <20080428163642.GA22790@neumann>
At least the dash from Ubuntu's /bin/sh says:
test: 233: ==: unexpected operator
Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
---
SZEDER Gábor, Mon, Apr 28, 2008 18:36:42 +0200:
> On Wed, Apr 23, 2008 at 10:53:47AM -0700, Junio C Hamano wrote:
> > "git clone [options] $src $dst excess-garbage" simply ignored
> > excess-garbage without giving any diagnostic message. Fix it.
> >
> > dir="$2"
> > + test $# == 2 || die "excess parameter to git-clone"
> ^^
> I think you mean:
>
> test $# = 2 || die "excess parameter to git-clone"
>
> I just noticed because it broke t1020-subdirectory at me.
And me. Almost every test which uses git-clone (I expect some don't
test its exit code in setup routines).
git-clone.sh | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/git-clone.sh b/git-clone.sh
index 9e433c0..8c7fc7f 100755
--- a/git-clone.sh
+++ b/git-clone.sh
@@ -219,7 +219,7 @@ fi
if test -n "$2"
then
dir="$2"
- test $# == 2 || die "excess parameter to git-clone"
+ test $# = 2 || die "excess parameter to git-clone"
else
# Derive one from the repository name
# Try using "humanish" part of source repo if user didn't specify one
--
1.5.5.1.118.g6dd1b6.dirty
prev parent reply other threads:[~2008-04-28 21:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-23 17:53 [PATCH] clone: detect and fail on excess parameters Junio C Hamano
2008-04-28 16:36 ` SZEDER Gábor
2008-04-28 21:09 ` Alex Riesen [this message]
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=20080428210955.GB10600@steel.home \
--to=raa.lkml@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=szeder@ira.uka.de \
/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).