Re: [PATCH 1/1] scan-tree: handle error in git_config_from_file()

2016-03-08 Thread Christian Hesse
Christian Hesse on Tue, 2016/03/08 16:01: > > > It gives: > > > > > > Error reading config /path/to/repository.git/config: Permission denied > > > (13) fatal: unable to access '/path/to/repository.git/config': > > > Permission denied > > > > > > Looks like this is fatal in git... > > > > Is

Re: [PATCH 1/1] scan-tree: handle error in git_config_from_file()

2016-03-08 Thread John Keeping
On Tue, Mar 08, 2016 at 03:54:22PM +0100, Christian Hesse wrote: > John Keeping on Tue, 2016/03/08 14:36: > > On Tue, Mar 08, 2016 at 03:26:23PM +0100, Christian Hesse wrote: > > > John Keeping on Tue, 2016/03/08 14:11: > > > > On Tue, Mar 08, 2016 at 02:51:46PM +0100, Christian Hesse wrote:

Re: [PATCH 1/1] scan-tree: handle error in git_config_from_file()

2016-03-08 Thread John Keeping
On Tue, Mar 08, 2016 at 04:01:59PM +0100, Christian Hesse wrote: > John Keeping on Tue, 2016/03/08 14:59: > > On Tue, Mar 08, 2016 at 03:54:22PM +0100, Christian Hesse wrote: > > > John Keeping on Tue, 2016/03/08 14:36: > > > > On Tue, Mar 08, 2016 at 03:26:23PM +0100, Christian Hesse wrote:

Re: [PATCH 1/1] scan-tree: handle error in git_config_from_file()

2016-03-08 Thread Christian Hesse
John Keeping on Tue, 2016/03/08 14:59: > On Tue, Mar 08, 2016 at 03:54:22PM +0100, Christian Hesse wrote: > > John Keeping on Tue, 2016/03/08 14:36: > > > On Tue, Mar 08, 2016 at 03:26:23PM +0100, Christian Hesse wrote: > > > > John Keeping on Tue, 2016/03/08 14:11: > > > > > On Tue, Mar

Re: [PATCH 1/1] scan-tree: handle error in git_config_from_file()

2016-03-08 Thread Christian Hesse
John Keeping on Tue, 2016/03/08 14:36: > On Tue, Mar 08, 2016 at 03:26:23PM +0100, Christian Hesse wrote: > > John Keeping on Tue, 2016/03/08 14:11: > > > On Tue, Mar 08, 2016 at 02:51:46PM +0100, Christian Hesse wrote: > > > > From: Christian Hesse > > > > > > > > Signed-off-by: Christian

Re: [PATCH 1/1] scan-tree: handle error in git_config_from_file()

2016-03-08 Thread John Keeping
On Tue, Mar 08, 2016 at 03:26:23PM +0100, Christian Hesse wrote: > John Keeping on Tue, 2016/03/08 14:11: > > On Tue, Mar 08, 2016 at 02:51:46PM +0100, Christian Hesse wrote: > > > From: Christian Hesse > > > > > > Signed-off-by: Christian Hesse > > > > Is this solving a particular problem o

Re: [PATCH 1/1] scan-tree: handle error in git_config_from_file()

2016-03-08 Thread Christian Hesse
John Keeping on Tue, 2016/03/08 14:11: > On Tue, Mar 08, 2016 at 02:51:46PM +0100, Christian Hesse wrote: > > From: Christian Hesse > > > > Signed-off-by: Christian Hesse > > Is this solving a particular problem or did you just notice that the > return value is ignored? > > I don't think re

Re: [PATCH 1/1] scan-tree: handle error in git_config_from_file()

2016-03-08 Thread John Keeping
On Tue, Mar 08, 2016 at 02:51:46PM +0100, Christian Hesse wrote: > From: Christian Hesse > > Signed-off-by: Christian Hesse Is this solving a particular problem or did you just notice that the return value is ignored? I don't think returning when this fails is correct because we've already add

Re: [PATCH 1/1] scan-tree: handle error in git_config_from_file()

2016-03-08 Thread Jason A. Donenfeld
Are repos without .git/config necessarily invalid? zx2c4@thinkpad ~ $ mkdir abcd zx2c4@thinkpad ~ $ cd abcd zx2c4@thinkpad ~/abcd $ git init Initialized empty Git repository in /home/zx2c4/abcd/.git/ zx2c4@thinkpad ~/abcd $ touch file zx2c4@thinkpad ~/abcd $ git add file zx2c4@thinkpad ~/abcd $ gi

[PATCH 1/1] scan-tree: handle error in git_config_from_file()

2016-03-08 Thread Christian Hesse
From: Christian Hesse Signed-off-by: Christian Hesse --- scan-tree.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scan-tree.c b/scan-tree.c index 2e87999..bc17d14 100644 --- a/scan-tree.c +++ b/scan-tree.c @@ -121,7 +121,11 @@ static void add_repo(const char *base, s