threads / discuss / 1436

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

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

## tl;dr

2 messages between Aug 6, 2005 and Aug 6, 2005.

replies: 1people: 2as markdown or json

Linus Torvalds· Aug 6, 2005, 17:04 UTC · lore

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" ]
Junio C Hamano· Aug 6, 2005, 17:18 UTC · re: Linus Torvalds · lore

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

Linus Torvalds <torvalds@osdl.org> writes:
Show 5 quoted lines
> 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..
Ouch.  Thanks.

← back to recent threads