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

Re: [PATCH v3] update-ref: add --rename option

From
Patrick Steinhardt <ps@pks.im>
Date
Jun 15, 2026, 08:57 UTC
Message-ID
<ai--jEk23E7RJPnc@pks.im>
In-Reply-To
<xmqqqzmbhikj.fsf@gitster.g>
On Fri, Jun 12, 2026 at 08:41:48AM -0700, Junio C Hamano wrote:
Show 20 quoted lines
> Patrick Steinhardt <ps@pks.im> writes:
> 
> > A slight tangent: this is part of why I really don't like commands that
> > determine their mode via flags: you now have to worry about every
> > combination of flags and whether they even make sense. With subcommands
> > we at least only have to worry about the set of flags that directly
> > apply to that given subcommand.
> >
> > Makes me wonder whether I should have a look at extending git-refs(1)
> > further:
> >
> >     git refs delete <ref> [<oldvalue>]
> >     git refs update <ref> <newvalue> [<oldvalue>]
> >     git refs rename <ref> <oldname> <newname>
> >
> > I always wanted to do this eventually so that we have one top-level
> > command that knows how to do "everything refs".
> 
> That may indeed be a better direction to go, but isn't update-ref
> the "everything refs" command already?

Well, it doesn't handle reading references, which is something that git-refs(1) already knows to do.

Patrick
Previous: Junio C HamanoNext: Junio C Hamano
Message 10 of 12 in “update-ref: add --rename option”
  1. update-ref: add --rename optionJunio C Hamano, Jun 9, 2026
  2. update-ref: add --rename optionJunio C Hamano, Jun 10, 2026
  3. Patrick SteinhardtJun 11, 2026
  4. Junio C HamanoJun 11, 2026
  5. Patrick SteinhardtJun 12, 2026
  6. Junio C HamanoJun 12, 2026
  7. update-ref: add --rename optionJunio C Hamano, Jun 11, 2026
  8. Patrick SteinhardtJun 12, 2026
  9. Junio C HamanoJun 12, 2026
  10. Patrick SteinhardtJun 15, 2026
  11. Junio C HamanoJun 15, 2026
  12. Patrick SteinhardtJun 16, 2026

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.