Re: [PATCH v2 1/8] config: Trivial rename in preparation for parseopt.
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Feb 17, 2009, 11:58 UTC
- Message-ID
- <alpine.DEB.1.00.0902171257360.6185@intel-tinevez-2-302>
- In-Reply-To
- <20090217090015.5334.qmail@ea511e23bd6d9a.315fe32.mid.smarden.org>
Hi,
On Tue, 17 Feb 2009, Gerrit Pape wrote:
Show 24 quoted lines
> On Mon, Feb 16, 2009 at 05:45:00PM -0800, Junio C Hamano wrote:
> > Felipe Contreras <felipe.contreras@gmail.com> writes:
> > > When using the --list option general errors where not properly reported,
> > > only errors related with the 'file'. Now they are reported, and 'file'
> > > is irrelevant.
> > > ...
> > > @@ -299,10 +300,8 @@ int cmd_config(int argc, const char **argv, const char *prefix)
> > > else if (!strcmp(argv[1], "--list") || !strcmp(argv[1], "-l")) {
> > > if (argc != 2)
> > > usage(git_config_set_usage);
> > > - if (git_config(show_all_config, NULL) < 0 &&
> > > - file && errno)
> > > - die("unable to read config file %s: %s", file,
> > > - strerror(errno));
> > > + if (git_config(show_all_config, NULL) < 0)
> > > + die("error processing config file(s)");
> >
> > Does the author of 93a56c2 (git-config: print error message if the config
> > file cannot be read, 2007-10-12) have any comment on this change (cc:ed)?
>
> Hm, we lose some information from the error message when called with
> --file, but it seems to improve on other cases. The filename doesn't
> matter that much, but it would be nice to know the reason. I wouldn't
> object against this hunk though if that isn't possible.The point is: when _not_ using --file, the output could be wrong (mentioning another config file than the one having an issue), or not be shown at all -- I haven't checked, but both options to not look good to me.
Ciao, Dscho