# [PATCH] Shell syntax fix in git-reset

2 messages from 2007-01-18 to 2007-01-19. Participants: David Kågedal, Junio C Hamano.
Thread: https://gitlist.dev/t/6424

## David Kågedal, 2007-01-18 11:15

Subject: [PATCH] Shell syntax fix in git-reset
Message-ID: <87ac0gfuwu.fsf@morpheus.local>
URL: https://gitlist.dev/e/87ac0gfuwu.fsf%40morpheus.local

```

---
 git-reset.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

My /bin/sh is a symlink to dash, which is probably why I got this and
few others.

diff --git a/git-reset.sh b/git-reset.sh
index bf2a058..fee6d98 100755
--- a/git-reset.sh
+++ b/git-reset.sh
@@ -43,7 +43,7 @@ case "$1" in --) shift ;; esac
 # affecting the working tree nor HEAD.
 if test $# != 0
 then
-	test "$reset_type" == "--mixed" ||
+	test "$reset_type" = "--mixed" ||
 		die "Cannot do partial $reset_type reset."
 
 	git-diff-index --cached $rev -- "$@" |
-- 
1.5.0.rc1.g04f3-dirty


-- 
David Kågedal

```

## Junio C Hamano, 2007-01-19 16:58

Subject: Re: [PATCH] Shell syntax fix in git-reset
Message-ID: <7vr6trhs2k.fsf@assigned-by-dhcp.cox.net>
URL: https://gitlist.dev/e/7vr6trhs2k.fsf%40assigned-by-dhcp.cox.net
In-Reply-To: <87ac0gfuwu.fsf@morpheus.local>

```
Thanks for catching this.  With your fix,

    $ git grep -e 'test .*==' -e '\[ .*==' -- '*.sh'

does not seem to hit anything else.

```
