# [PATCH] git-new-workdir: Fix shell warning about operator == used with test.

2 messages from 2007-06-25 to 2007-06-27. Participants: Simon Hausmann, Junio C Hamano.
Thread: https://gitlist.dev/t/8712

## Simon Hausmann, 2007-06-25 11:04

Subject: [PATCH] git-new-workdir: Fix shell warning about operator == used with test.
Message-ID: <200706251304.28886.simon@lst.de>
URL: https://gitlist.dev/e/200706251304.28886.simon%40lst.de

```
Use = instead of == with test to test for equality.

Signed-off-by: Simon Hausmann <simon@lst.de>
---
 contrib/workdir/git-new-workdir |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/contrib/workdir/git-new-workdir b/contrib/workdir/git-new-workdir
index 709b2a3..3ff6bd1 100755
--- a/contrib/workdir/git-new-workdir
+++ b/contrib/workdir/git-new-workdir
@@ -24,7 +24,7 @@ git_dir=$(cd "$orig_git" 2>/dev/null &&
   git rev-parse --git-dir 2>/dev/null) ||
   die "\"$orig_git\" is not a git repository!"
 
-if test "$git_dir" == ".git"
+if test "$git_dir" = ".git"
 then
 	git_dir="$orig_git/.git"
 fi
-- 
1.5.2.2.549.gaeb59

```

## Junio C Hamano, 2007-06-27 02:14

Subject: Re: [PATCH] git-new-workdir: Fix shell warning about operator == used with test.
Message-ID: <7v645ata8j.fsf@assigned-by-dhcp.pobox.com>
URL: https://gitlist.dev/e/7v645ata8j.fsf%40assigned-by-dhcp.pobox.com
In-Reply-To: <200706251304.28886.simon@lst.de>

```
Thanks.

```
