# git daemon broken?

2 messages from 2005-11-21 to 2005-11-21. Participants: YOSHIFUJI Hideaki / 吉藤英明, Junio C Hamano.
Thread: https://gitlist.dev/t/2623

## YOSHIFUJI Hideaki / 吉藤英明, 2005-11-21 06:47

Subject: git daemon broken?
Message-ID: <20051121.154733.64482215.yoshfuji@linux-ipv6.org>
URL: https://gitlist.dev/e/20051121.154733.64482215.yoshfuji%40linux-ipv6.org

```
Hello.

It seems that git-daemon is broken.

(On server side)
% git daemon --verbose
(On client side)
% git pull git://git.skbuff.net/gitroot/yoshfuji/x.git

Then, we get on the server side,
:
[16660] Request for '/gitroot/yoshfuji/x.git'
fatal: '.': unable to chdir or not a git archive
[16660] Disconnected (with error)

It works if I remove "--strict" from daemon.c.

% git daemon --verbose
:
[16723] Request for '/gitroot/yoshfuji/x.git'
Packing 21 objects
[16723] Disconnected

-- 
YOSHIFUJI Hideaki @ USAGI Project  <yoshfuji@linux-ipv6.org>
GPG-FP  : 9022 65EB 1ECF 3AD1 0BDF  80D8 4807 F894 E062 0EEA

```

## Junio C Hamano, 2005-11-21 07:30

Subject: Re: git daemon broken?
Message-ID: <7vpsouwj97.fsf@assigned-by-dhcp.cox.net>
URL: https://gitlist.dev/e/7vpsouwj97.fsf%40assigned-by-dhcp.cox.net
In-Reply-To: <20051121.154733.64482215.yoshfuji@linux-ipv6.org>

```
I think this should fix it; the problem analysis I did in my
previous mail was half-baked, and the thing about '||' vs '&&'
was completely faulty.  Obviously I am not thinking straight
tonight, so I'll go to bed.

---

diff --git a/path.c b/path.c
index 84b3272..4d88947 100644
--- a/path.c
+++ b/path.c
@@ -181,7 +181,7 @@ char *enter_repo(char *path, int strict)
 		return NULL;
 
 	if (strict) {
-		if((path[0] != '/') || chdir(path) < 0)
+		if (chdir(path) < 0)
 			return NULL;
 	}
 	else {

```
