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

Make git-sh-setup-script do what it was supposed to do

From
Linus Torvalds <torvalds@osdl.org>
Date
Aug 6, 2005, 17:04 UTC
Message-ID
<Pine.LNX.4.58.0508061002370.3258@g5.osdl.org>

Duh. A missing && meant that half the tests that git-sh-setup-script were _meant_ to do were actually totally ignored.

In particular, the git sanity checking ended up only testing that the GIT_OBJECT_DIRECTORY was sane, not that GIT_DIR itself was..

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
---
diff --git a/git-sh-setup-script b/git-sh-setup-script
--- a/git-sh-setup-script
+++ b/git-sh-setup-script
@@ -12,6 +12,6 @@ die() {
 }
 
 [ -d "$GIT_DIR" ] &&
-[ -d "$GIT_DIR/refs" ]
+[ -d "$GIT_DIR/refs" ] &&
 [ -d "$GIT_OBJECT_DIRECTORY" ] &&
 [ -d "$GIT_OBJECT_DIRECTORY/00" ]
Next: Junio C Hamano
Message 1 of 2 in “Make git-sh-setup-script do what it was supposed to do”
  1. Linus TorvaldsAug 6, 2005
  2. Junio C HamanoAug 6, 2005

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.