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

Subsystems: the rest

DORMANTno replies

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

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

From: Simon Hausmann <hidden>
Date: 2016-06-15 22:43:18

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

Signed-off-by: Simon Hausmann <redacted>
---
 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

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

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:43:18

Thanks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help