[PATCH] Use "=" instead of "==" in condition as it is more portable

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: SZEDER <szeder@...>
Cc: Junio C Hamano <gitster@...>, <git@...>
Date: Monday, April 28, 2008 - 5:09 pm

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:

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

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] clone: detect and fail on excess parameters, Junio C Hamano, (Wed Apr 23, 1:53 pm)
[PATCH] Use "=" instead of "==" in condition as it is more p..., Alex Riesen, (Mon Apr 28, 5:09 pm)