Skip to contentSkip to conversation

Shell syntax fix in git-reset

PATCH In review David Kågedal 2 participants 2 messages Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Shell syntax fix in git-reset

---
 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.

git-reset.sh +1 -1
index bf2a058..fee6d98 100755
@@ -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 -- "$@" |
Signature · 5 lines
1.5.0.rc1.g04f3-dirty


-- 
David Kågedal
#1 lore raw

Thanks for catching this. With your fix,

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

does not seem to hit anything else.