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

Re: [PATCH 1/2] show-ref.c: Add missing call to git_config()

From
Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Date
Jun 18, 2013, 18:38 UTC
Message-ID
<51C0A939.8030200@ramsay1.demon.co.uk>
In-Reply-To
<7vppvlighf.fsf@alter.siamese.dyndns.org>
Junio C Hamano wrote:
Show 21 quoted lines
> Ramsay Jones <ramsay@ramsay1.demon.co.uk> writes:
> 
>> At present, 'git show-ref' ignores any attempt to set config
>> variables (e.g. core.checkstat) from the command line using
>> the -c option to git.
> 
> I think what you really want to see is not giving "-c" and have it
> honored.
> 
> 	"git show-ref" does not honor configuration variables at
> 	all, but at least core configuration variables read by
> 	git_default_config (most importantly core.checkstat) should
> 	be read and honored, because ...
> 
> would be more appropriate.  What are the variables that matter to
> show-ref, and what are the reasons why they should be honored?  I
> thought show-ref was just a way to enumerate refs, and does not read
> the index nor checks if there are modifications in the working tree,
> so I do not see any reason offhand for it to honor core.checkstat
> (and I think that is the reason why we don't have the call there in
> the current code).
:-D Yes, you caught me!

These patches *may* not be necessary, prior to Michael's "reference related races" series. Specifically, the introduction of the stat_validity_check() function to the reference handling API.

This means that the behaviour 'git show-ref' is now affected by several config variables, including core.checkstat. I haven't spent any time auditing the code, but the list would include (at least) core.trustctime, core.filemode, core.checkstat, core.ignorecygwinfstricks, ...

> 
> Exactly the same comment applies to 2/2.
ditto
> Note that I am _not_ opposing these changes.  You brought them up
> because you saw some reason why these should honor some core
> variables.  I just want that reason to be explained in the log for
> the future developers.
Yes, I will send a v2 (soon-ish, I hope).

ATB, Ramsay Jones

Previous: Junio C HamanoNext: Junio C Hamano
Message 3 of 5 in “show-ref.c: Add missing call to git_config()”
  1. 1/2 show-ref.c: Add missing call to git_config()Ramsay Jones, Jun 15, 2013
  2. Junio C HamanoJun 17, 2013
  3. Ramsay JonesJun 18, 2013
  4. Junio C HamanoJul 1, 2013
  5. Ramsay JonesJul 4, 2013

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.