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

Re: [RFC] control, what refs are honored by core.logAllRefUpdates

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 12, 2011, 17:57 UTC
Message-ID
<7vaacj8jq7.fsf@alter.siamese.dyndns.org>
In-Reply-To
<CAKPyHN3_br-ndQo9oMzCcU1yOVEbAxmzvHQkwF15LgwQx12KZA@mail.gmail.com>
Bert Wesarg <bert.wesarg@googlemail.com> writes:
Show 14 quoted lines
> What: Control the refs which are honored by core.logAllRefUpdates.
>
> How:
>
> Introduce a new config variable named core.autoRefLog. This variable
> is a multi var. The default value is:
>
>     [core]
>         autoLogRef = heads
>         autoLogRef = remotes
>         autoLogRef = notes
>
> This list must be initialize at runtime. Because older repositories
> won't have them in existing config files.

It sounds as if you mean to update .git/config when you find a repository that is missing these, which is not what we want. I would rephrase it like this:

 - The new variable core.autoLogRef is a multi-valued configuration.
 - If core.autoLogRef is defined (to any value), core.logAllRefupdates is
   ignored;
 - Otherwise, the core.logAllRefUpdates variable that is set to true is
   equivalent to having a "reasonable default" set in core.autoLogRef (and
   the current "reasonable default" happens to be heads, remotes and
   notes), and the core.logAllRefUpdates variable set to false (or
   missing) is equivalent to having an empty string in core.autoLogRef;
Show 5 quoted lines
> The value given needs to be a valid ref, without leading or trailing
> slashes, and wildcards. The names will be prefixed with 'refs/' and
> suffixed with '/'. The list is checked against the ref to update, if
> any of the values is a prefix of the given ref, than the update will
> be logged, regardless whether the log file exists.
Ok, except for:
 - An empty string in core.autoLogRef does not contribute to the matching
   logic above.
> Setting core.autoLogRef to the empty value, will reset the list.
It is unclear what it is reset to.  Do you mean it clears, e.g.
    [core]
    	autoLogRef = heads
    	autoLogRef = remotes
        autoLogRef = notes
        autoLogRef =
        autoLogRef = heads

would first create a list of three elements, clears it and then the final result has only refs/heads/ in the list?

Previous: Bert WesargNext: Bert Wesarg
Message 2 of 7 in “Re: [RFC] control, what refs are honored by core.logAllRefUpdates”
  1. Bert WesargJul 12, 2011
  2. Junio C HamanoJul 12, 2011
  3. Bert WesargJul 12, 2011
  4. Jeff KingJul 12, 2011
  5. Jonathan NiederJul 12, 2011
  6. Bert WesargJul 13, 2011
  7. Jeff KingJul 13, 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.