List for cgit developers and users
 help / color / mirror / Atom feed
* [PATCH 1/1] scan-tree: handle error in git_config_from_file()
@ 2016-03-08 13:51 list
  2016-03-08 14:05 ` Jason
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: list @ 2016-03-08 13:51 UTC (permalink / raw)


From: Christian Hesse <mail at eworm.de>

Signed-off-by: Christian Hesse <mail at eworm.de>
---
 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, struct strbuf *path, repo_config_fn fn)
 	config_fn = fn;
 	if (ctx.cfg.enable_git_config) {
 		strbuf_addstr(path, "config");
-		git_config_from_file(gitconfig_config, path->buf, NULL);
+		if (git_config_from_file(gitconfig_config, path->buf, NULL)) {
+			fprintf(stderr, "Error reading config %s: %s (%d)\n",
+				path->buf, strerror(errno), errno);
+			return;
+		}
 		strbuf_setlen(path, pathlen);
 	}
 
-- 
2.7.2



^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2016-03-11  7:49 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-08 13:51 [PATCH 1/1] scan-tree: handle error in git_config_from_file() list
2016-03-08 14:05 ` Jason
2016-03-08 14:11 ` john
2016-03-08 14:26   ` list
2016-03-08 14:36     ` john
2016-03-08 14:54       ` list
2016-03-08 14:59         ` john
2016-03-08 15:01           ` list
2016-03-08 15:05             ` john
2016-03-08 15:08             ` list
2016-03-09 10:16 ` [PATCH v2 " list
2016-03-09 11:05   ` Jason
2016-03-11  7:49     ` list

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).