From 86b13da46cd710a45a89968880c691452d5b70b4 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Fri, 2 Sep 2005 10:53:15 -0700 Subject: scripts: equality test '==' is not portable. On NetBSD 3 we trigger an error: [: ==: unexpected operator Double-equal is accepted by bash built-in '[' and bash(1) suggests using '=' for strict POSIX compliance (test(1) from coreutils does not mention '=='). Eradicate their uses everywhere. [jc: Somebody with a pseudonym kindly sent a message to let me know about the problem privately; I do not have access to a NetBSD box.] Signed-off-by: Junio C Hamano --- git-resolve-script | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'git-resolve-script') diff --git a/git-resolve-script b/git-resolve-script index 7c0e3d8aa8..000cbb85e3 100755 --- a/git-resolve-script +++ b/git-resolve-script @@ -36,19 +36,21 @@ if [ -z "$common" ]; then die "Unable to find common commit between" $merge $head fi -if [ "$common" == "$merge" ]; then +case "$common" in +"$merge") echo "Already up-to-date. Yeeah!" dropheads exit 0 -fi -if [ "$common" == "$head" ]; then + ;; +"$head") echo "Updating from $head to $merge." git-read-tree -u -m $head $merge || exit 1 echo $merge > "$GIT_DIR"/HEAD git-diff-tree -p $head $merge | git-apply --stat dropheads exit 0 -fi + ;; +esac # Find an optimum merge base if there are more than one candidates. LF=' -- cgit v1.2.1