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

Re: [PATCH 2/2 v4] tag: support configuring --sort via .gitconfig

From
Keller, Jacob E <jacob.e.keller@intel.com>
Date
Jul 11, 2014, 17:20 UTC
Message-ID
<1405099217.22963.11.camel@jekeller-desk1.amr.corp.intel.com>
In-Reply-To
<xmqqion4543l.fsf@gitster.dls.corp.google.com>
On Fri, 2014-07-11 at 08:04 -0700, Junio C Hamano wrote:
> Jacob Keller <jacob.e.keller@intel.com> writes:
> 
Show 14 quoted lines
> > +
> > +	if (strcmp(arg, "refname"))
> > +		die(_("unsupported sort specification %s"), arg);
> 
> Hmm.  I _thought_ we try to catch unsupported option value coming
> from the command line and die but at the same time we try *not* to
> die but warn and whatever is sensible when the value comes from the
> configuration, so that .git/config or $HOME/.gitconfig can be shared
> by those who use different versions of Git.
> 
> Do we already have many precedences where we see configuration value
> that our version of Git do not yet understand?
> 
> Not a very strong objection; just something that worries me.

Based on a cursory glance at how the config is parsed, we actually die_on_error for most options. Does it makes sense to warn or not? I am not really sure here.. At any rate I updated this to be a bit cleaner and use error( instead of die, so that it will work within how config is supposed to.. Plus, this also makes it so that --sort shows the usage if it's invalid.

Please comment more on the new set I am sending so we can really determine what the correct course of action is here.

Regards, Jake

Previous: Keller, Jacob ENext: Duy Nguyen
Message 9 of 10 in “tag: use skip_prefix instead of magic numbers”
  1. 1/2 tag: use skip_prefix instead of magic numbersJacob Keller, Jul 10, 2014
  2. 2/2 tag: support configuring --sort via .gitconfigJacob Keller, Jul 10, 2014
  3. Junio C HamanoJul 11, 2014
  4. Keller, Jacob EJul 11, 2014
  5. Junio C HamanoJul 11, 2014
  6. Keller, Jacob EJul 11, 2014
  7. Junio C HamanoJul 11, 2014
  8. Keller, Jacob EJul 11, 2014
  9. Keller, Jacob EJul 11, 2014
  10. Duy NguyenJul 16, 2014

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.