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

Re: renaming remote branches

From
Dmitry Potapov <dpotapov@gmail.com>
Date
Apr 17, 2009, 16:20 UTC
Message-ID
<37fcd2780904170920m5a0c6c24se345275b0944e59d@mail.gmail.com>
In-Reply-To
<76718490904160609s1ef9c1e0m6f19ff169666fa3@mail.gmail.com>
On Thu, Apr 16, 2009 at 5:09 PM, Jay Soffian <jaysoffian@gmail.com> wrote:
Show 7 quoted lines
>
> I wonder whether we should:
>
> a) teach git remote a rename-branch sub-command
> b) add support on the remote side for properly preserving the config and reflog
>
> Thoughts?

Besides a race condition in creating new and deleting old branch, which Jeff already mentioned, it could be some other problems. For instance, how this new feature is going to interact with the update hook that many users already have? It seems to me there is no way to make it backward compatible with existing update hooks, so it will require to add a new hook, and by default (unless this rename hook is explicitly allowed), renaming should not be allowed, otherwise it can be used to circumvent restrictions built inside 'update' hook.

Dmitry
Previous: Jeff King
Message 9 of 9 in “renaming remote branches”
  1. Miles BaderApr 16, 2009
  2. Jeff KingApr 16, 2009
  3. Miles BaderApr 16, 2009
  4. Jeff KingApr 16, 2009
  5. Jay SoffianApr 16, 2009
  6. Jeff KingApr 16, 2009
  7. Miles BaderApr 17, 2009
  8. Jeff KingApr 17, 2009
  9. Dmitry PotapovApr 17, 2009

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.