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

Re: [RFC] git-branch: add options and tests for branch renaming

From
Andy Whitcroft <apw@shadowen.org>
Date
Nov 28, 2006, 15:03 UTC
Message-ID
<456C4FCE.6090306@shadowen.org>
In-Reply-To
<11647252603530-git-send-email-hjemli@gmail.com>
Lars Hjemli wrote:
Show 15 quoted lines
> Extend git-branch with the following options:
> 
>   git-branch -m|-M [<oldbranch>] newbranch
> 
> The -M variation is required to force renaming over an exsisting
> branchname.
> 
> This also indroduces $GIT_DIR/RENAME_REF which is a "metabranch"
> used when renaming branches. It will always hold the original sha1
> for the latest renamed branch.
> 
> Additionally, if $GIT_DIR/logs/RENAME_REF exists, all branch rename
> events are logged there.
> 
> Finally, some testcases are added to verify the new options.
Ok, I have been feeling uneasy about rename and reflogs for a while now.
 About removing reflogs too for that matter.

In my mind the ref log is about tracking what a ref points to. So I want to be able to say "what was next, yesterday". Do I care if its not there now? Perhaps I want a rename to just put a rename from in the top of the new reflog and leave the old there.

Yep, no idea how we would clean them up with this model.  But ...
Previous: Lars HjemliNext: Shawn Pearce
Message 2 of 4 in “[RFC] git-branch: add options and tests for branch renaming”
  1. Lars HjemliNov 28, 2006
  2. Andy WhitcroftNov 28, 2006
  3. Shawn PearceNov 28, 2006
  4. Lars HjemliNov 28, 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.