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

Re: [PATCH] tag: add tag.createReflog option

From
Jeff King <peff@peff.net>
Date
Jan 25, 2017, 18:00 UTC
Message-ID
<20170125180054.7mioop2o6uvqloyt@sigill.intra.peff.net>
In-Reply-To
<20170125001906.13916-1-cornelius.weig@tngtech.com>
On Wed, Jan 25, 2017 at 01:19:06AM +0100, cornelius.weig@tngtech.com wrote:
Show 6 quoted lines
> From: Cornelius Weig <cornelius.weig@tngtech.com>
> 
> Git does not create a history for tags, in contrast to common
> expectation to simply version everything. This can be changed by using
> the `--create-reflog` flag when creating the tag. However, a config
> option to enable this behavior by default is missing.

Hmm, I didn't even know we had "tag --create-reflog". Looks like it was added by 144c76fa39 (update-ref and tag: add --create-reflog arg, 2015-07-21).

IMHO it is a mistake. The "update-ref --create-reflog" variant makes sense to me as a plumbing operation. But are there end users who want to create a reflog for just _one_ tag?

As your patch shows, the more likely variant is "I want reflogs for all tags". But that raises two questions with your patch:

  - yours isn't "reflogs for all tags". It's "reflogs for tags I created
    with git-tag". What about other operations that create tags, like
    fetching (or even just a script that uses update-ref under the
    hood).
    IOW, instead of tag.createReflog, should this be tweaing
    core.logallrefupdates to have a mode that includes tags?
  - Is that the end of it, or is the desire really "I want reflogs for
    _everything_"? That seems like a sane thing to want.
    If so, then the update to core.logallrefupdates should turn it into
    a tri-state:
      - false; no reflogs
      - true; reflogs for branches, remotes, notes, as now
      - always; reflogs for all refs under "refs/"

I made a lot of suppositions about your desires there, so maybe you really do want just tag.createReflog. But "core.logallrefupdates = always" sounds a lot more useful to me.

-Peff
Previous: Pranit BauvaNext: Junio C Hamano
Message 3 of 33 in “tag: add tag.createReflog option”
  1. tag: add tag.createReflog optioncornelius.weig@tngtech.com, Jan 25, 2017
  2. Pranit BauvaJan 25, 2017
  3. Jeff KingJan 25, 2017
  4. Junio C HamanoJan 25, 2017
  5. Cornelius WeigJan 25, 2017
  6. Jeff KingJan 25, 2017
  7. Junio C HamanoJan 25, 2017
  8. Junio C HamanoJan 25, 2017
  9. Cornelius WeigJan 25, 2017
  10. refs: add option core.logAllRefUpdates = alwayscornelius.weig@tngtech.com, Jan 26, 2017
  11. refs: add option core.logAllRefUpdates = alwayscornelius.weig@tngtech.com, Jan 26, 2017
  12. Jeff KingJan 26, 2017
  13. Cornelius WeigJan 26, 2017
  14. Jeff KingJan 26, 2017
  15. 1/3 config: add markup to core.logAllRefUpdates doccornelius.weig@tngtech.com, Jan 26, 2017
  16. 2/3 refs: add option core.logAllRefUpdates = alwayscornelius.weig@tngtech.com, Jan 26, 2017
  17. Junio C HamanoJan 26, 2017
  18. 3/3 update-ref: add test cases for bare repositorycornelius.weig@tngtech.com, Jan 26, 2017
  19. Junio C HamanoJan 26, 2017
  20. Junio C HamanoJan 26, 2017
  21. 1/3 config: add markup to core.logAllRefUpdates doccornelius.weig@tngtech.com, Jan 27, 2017
  22. 3/3 update-ref: add test cases for bare repositorycornelius.weig@tngtech.com, Jan 27, 2017
  23. 2/3 refs: add option core.logAllRefUpdates = alwayscornelius.weig@tngtech.com, Jan 27, 2017
  24. Junio C HamanoJan 30, 2017
  25. Junio C HamanoJan 30, 2017
  26. Cornelius WeigJan 31, 2017
  27. Junio C HamanoJan 31, 2017
  28. Jeff KingJan 30, 2017
  29. Cornelius WeigJan 31, 2017
  30. Jeff KingJan 31, 2017
  31. Junio C HamanoJan 31, 2017
  32. Cornelius WeigJan 31, 2017
  33. Junio C HamanoJan 31, 2017

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.