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

Re: [PATCH] Documentation: clearly specify what refs are honored by core.logAllRefUpdates

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 11, 2011, 17:29 UTC
Message-ID
<7v7h7og1zo.fsf@alter.siamese.dyndns.org>
In-Reply-To
<c63583df97ff8dd596d16d4471041d6ebedb67e8.1310375571.git.bert.wesarg@googlemail.com>
Bert Wesarg <bert.wesarg@googlemail.com> writes:
> The documentation for logging updates in git-update-ref, doesn't make it
> clear that only a specific subset of refs are honored by this variable.
Thanks.
> The initial justification in 4057deb (Junio C Hamano, 2006-10-08), leaves
> the impression, that a blacklist would have made more sense,...

I didn't mean it that way, and I still don't think blacklisting is feasible nor necessarily desirable. Different porcelains can use namespaces under refs/ for their own purposes, and it would be more prudent not to create reflog files that can grow long and not useful given that we cannot predict/guess what they are used for and how, so I would prefer white-listing the ones that are known to be useful.

It might make sense to allow customizing the white-list via the configuration mechanism, though. When your favorite third-party git "frotz" add-on uses refs/frotz/ hierarchy for its own purpose, and if viewing "git log -g frotz/master@{now}" is useful, you may want to be able to say "In addition to the standard ones, please log refs/frotz/* automatically". Of the top of my head, something like:

	[core]
		autoRefLog = refs/heads/*
		autoRefLog = refs/remotes/*
		autoRefLog = refs/notes/*
or less expressive but even simpler and probably sufficient:
	[core]
        	autoRefLog = heads remotes notes

can be the spelled-out form of traditional "core.logAllRefUpdates", and you may be able to tweak it like:

	[core]
        	autoRefLog = heads remotes notes frotz
Previous: Bert WesargNext: Bert Wesarg
Message 2 of 6 in “Documentation: clearly specify what refs are honored by core.logAllRefUpdates”
  1. Documentation: clearly specify what refs are honored by core.logAllRefUpdatesBert Wesarg, Jul 11, 2011
  2. Junio C HamanoJul 11, 2011
  3. Bert WesargJul 11, 2011
  4. Junio C HamanoJul 11, 2011
  5. Michael HaggertyJul 12, 2011
  6. Bert WesargJul 12, 2011

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.