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

2 messages from 2005-08-06 to 2005-08-06. Participants: Linus Torvalds, Junio C Hamano.
Thread: https://gitlist.dev/t/1436

## Linus Torvalds, 2005-08-06 17:04

Subject: Make git-sh-setup-script do what it was supposed to do
Message-ID: <Pine.LNX.4.58.0508061002370.3258@g5.osdl.org>
URL: https://gitlist.dev/e/Pine.LNX.4.58.0508061002370.3258%40g5.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" ]

```

## Junio C Hamano, 2005-08-06 17:18

Subject: Re: Make git-sh-setup-script do what it was supposed to do
Message-ID: <7vll3f9e7b.fsf@assigned-by-dhcp.cox.net>
URL: https://gitlist.dev/e/7vll3f9e7b.fsf%40assigned-by-dhcp.cox.net
In-Reply-To: <Pine.LNX.4.58.0508061002370.3258@g5.osdl.org>

```
Linus Torvalds <torvalds@osdl.org> writes:

> 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.

```
