threads / patch / 8712

patchgit-new-workdir: Fix shell warning about operator == used with test.

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

## tl;dr

2 messages between Jun 25, 2007 and Jun 27, 2007. Diffs are folded; open one to read it.

replies: 1people: 2as markdown or json

Simon Hausmann· Jun 25, 2007, 11:04 UTC · lore
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(-)
Show changes to contrib/workdir/git-new-workdir +1 −1
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

← back to recent threads