git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v2 1/8] config: Trivial rename in preparation for parseopt.

From
Gerrit Pape <pape@smarden.org>
Date
Feb 17, 2009, 09:00 UTC
Message-ID
<20090217090015.5334.qmail@ea511e23bd6d9a.315fe32.mid.smarden.org>
In-Reply-To
<7v3aedet0j.fsf@gitster.siamese.dyndns.org>
On Mon, Feb 16, 2009 at 05:45:00PM -0800, Junio C Hamano wrote:
Show 18 quoted lines
> 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.

Regards, Gerrit.
Previous: Felipe ContrerasNext: Johannes Schindelin
Message 23 of 24 in “config: Trivial rename in preparation for parseopt.”
  1. 1/8 config: Trivial rename in preparation for parseopt.Felipe Contreras, Feb 17, 2009
  2. 2/8 config: Reorganize get_color*.Felipe Contreras, Feb 17, 2009
  3. 3/8 config: Use parseopt.Felipe Contreras, Feb 17, 2009
  4. 4/8 config: Disallow multiple variable types.Felipe Contreras, Feb 17, 2009
  5. 5/8 config: Disallow multiple config file locations.Felipe Contreras, Feb 17, 2009
  6. 6/8 config: Don't allow extra arguments for -e or -l.Felipe Contreras, Feb 17, 2009
  7. 7/8 config: Codestyle cleanups.Felipe Contreras, Feb 17, 2009
  8. 8/8 config: Cleanup editor action.Felipe Contreras, Feb 17, 2009
  9. Junio C HamanoFeb 17, 2009
  10. Junio C HamanoFeb 17, 2009
  11. Junio C HamanoFeb 17, 2009
  12. Felipe ContrerasFeb 17, 2009
  13. Junio C HamanoFeb 17, 2009
  14. Felipe ContrerasFeb 17, 2009
  15. Johannes SchindelinFeb 17, 2009
  16. Felipe ContrerasFeb 17, 2009
  17. Felipe ContrerasFeb 17, 2009
  18. Junio C HamanoFeb 17, 2009
  19. Junio C HamanoFeb 17, 2009
  20. Felipe ContrerasFeb 17, 2009
  21. Johannes SchindelinFeb 17, 2009
  22. Felipe ContrerasFeb 17, 2009
  23. Gerrit PapeFeb 17, 2009
  24. Johannes SchindelinFeb 17, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.