From mboxrd@z Thu Jan 1 00:00:00 1970 From: list at eworm.de (Christian Hesse) Date: Tue, 8 Mar 2016 15:26:23 +0100 Subject: [PATCH 1/1] scan-tree: handle error in git_config_from_file() In-Reply-To: <20160308141135.GC17523@serenity.lan> References: <1457445106-17365-1-git-send-email-list@eworm.de> <20160308141135.GC17523@serenity.lan> Message-ID: <20160308152623.2104c4ca@leda.localdomain> 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 returning when this fails is correct because we've already > added the repository to the list by this point and a lot of the > remaining code in this function will do something sensible even if > git_config_from_file() fails. > > In fact, git_config_from_file() sets the die_on_error flag for > do_config_from() so the only case that gives us an error here is if the > config file cannot be opened. I don't think it's unreasonable to print > an error if that happens but bailing out of the function at this point > is wrong. Ok, probably you are right... Actually I do have a particular problem, but it is not solved by this patch. :-p Just stumbled and thought it is a good idea. I have a repository that has a config with bad permissions, so http server's user can not read it. cgit does not print http headers and http server bails out with error 500. What path does it take? -- main(a){char*c=/* Schoene Gruesse */"B?IJj;MEH" "CX:;",b;for(a/* Best regards my address: */=0;b=c[a++];) putchar(b-1/(/* Chris cc -ox -xc - && ./x */b/42*2-3)*42);} -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 473 bytes Desc: OpenPGP digital signature URL: