threads / discuss / 2623

git daemon broken?

Subject: git daemon broken?

## tl;dr

2 messages between Nov 21, 2005 and Nov 21, 2005.

replies: 1people: 2as markdown or json

YOSHIFUJI Hideaki / 吉藤英明· Nov 21, 2005, 06:47 UTC · lore
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· Nov 21, 2005, 07:30 UTC · re: YOSHIFUJI Hideaki / 吉藤英明 · lore

Re: git daemon broken?

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 {

← back to recent threads