From 782d66f4e0af30059445f4ae7d42efc670ea26c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Beaupr=C3=A9?= Date: Sun, 31 May 2015 18:08:08 -0400 Subject: find bare repos and ignore read errors this will still warn us, but at least not completely crash --- gittorrentd | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gittorrentd b/gittorrentd index 2383bfd..cc60339 100755 --- a/gittorrentd +++ b/gittorrentd @@ -76,7 +76,8 @@ function bpad (n, buf) { dht.on('ready', function () { // Spider all */.git dirs and announce all refs. - var repos = glob.sync('*/.git/git-daemon-export-ok') + var repos = glob.sync('*/{,.git/}git-daemon-export-ok', {strict: false}) + console.log(repos) var count = repos.length repos.forEach(function (repo) { console.log('in repo ' + repo) -- cgit v1.2.3 From f8f833d5203b4dadfdc7632c7688c51931b33d5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Beaupr=C3=A9?= Date: Sun, 31 May 2015 18:49:49 -0400 Subject: make debug message more useful --- gittorrentd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gittorrentd b/gittorrentd index cc60339..3a6c39c 100755 --- a/gittorrentd +++ b/gittorrentd @@ -77,7 +77,7 @@ function bpad (n, buf) { dht.on('ready', function () { // Spider all */.git dirs and announce all refs. var repos = glob.sync('*/{,.git/}git-daemon-export-ok', {strict: false}) - console.log(repos) + console.log('found repos: ' + repos) var count = repos.length repos.forEach(function (repo) { console.log('in repo ' + repo) -- cgit v1.2.3 From bfe8b17eec315d38070417bf45d5cbcbbb74dc18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Beaupr=C3=A9?= Date: Sun, 31 May 2015 18:51:54 -0400 Subject: remove debugging message --- gittorrentd | 1 - 1 file changed, 1 deletion(-) diff --git a/gittorrentd b/gittorrentd index 3a6c39c..130731f 100755 --- a/gittorrentd +++ b/gittorrentd @@ -77,7 +77,6 @@ function bpad (n, buf) { dht.on('ready', function () { // Spider all */.git dirs and announce all refs. var repos = glob.sync('*/{,.git/}git-daemon-export-ok', {strict: false}) - console.log('found repos: ' + repos) var count = repos.length repos.forEach(function (repo) { console.log('in repo ' + repo) -- cgit v1.2.3