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

Re: [RFC] Teach git-branch howto rename a branch

From
Jakub Narebski <jnareb@gmail.com>
Date
Nov 25, 2006, 08:53 UTC
Message-ID
<ek9078$m2j$1@sea.gmane.org>
In-Reply-To
<20061125064901.GB4528@spearce.org>
Shawn Pearce wrote:
Show 13 quoted lines
> Junio C Hamano <junkio@cox.net> wrote:
>> Without -f, it should barf.  With -f, we would want the rename
>> to happen.  In the latter case, I think it should work the same
>> way as deleting it and creating it anew, and that would make
>> sure that reflog for the old one will be lost and a new log is
>> started afresh; otherwise, the log would say old history for
>> that branch and it won't be a "rename" anymore.
> 
> This patch doesn't rename the reflog when the branch renames.
> Myself and a few other users I support want the reflog preserved
> when a branch renames, we all see the reflog as part of the history
> of that branch and a rename is the same branch but stored under a
> different name...
And of course reflog should store the fact of renaming branch.
> I had planned to do a rename branch command myself, but its been
> lower priority than everything else, so I have just never gotten
> around to it.  I'm glad to see someone is attempting it!

I have thought that command to rename branch was created to deal with simultaneous renaming of reflog + marking rename in reflog.

-- 
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git
Previous: Shawn PearceNext: Shawn Pearce
Message 4 of 13 in “[RFC] Teach git-branch howto rename a branch”
  1. Lars HjemliNov 24, 2006
  2. Junio C HamanoNov 25, 2006
  3. Shawn PearceNov 25, 2006
  4. Jakub NarebskiNov 25, 2006
  5. Shawn PearceNov 25, 2006
  6. Lars HjemliNov 25, 2006
  7. Junio C HamanoNov 25, 2006
  8. Lars HjemliNov 25, 2006
  9. git-branch -D: make it work even when on a yet-to-be-born branchJunio C Hamano, Nov 25, 2006
  10. Lars HjemliNov 25, 2006
  11. Fredrik KuivinenNov 25, 2006
  12. Lars HjemliNov 25, 2006
  13. Josef WeidendorferNov 26, 2006

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.