git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Simon Hausmann <simon@lst.de>
Date
Jun 25, 2007, 11:04 UTC
Message-ID
<200706251304.28886.simon@lst.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
Next: Junio C Hamano
Message 1 of 2 in “git-new-workdir: Fix shell warning about operator == used with test.”
  1. git-new-workdir: Fix shell warning about operator == used with test.Simon Hausmann, Jun 25, 2007
  2. Junio C HamanoJun 27, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.