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

Re: [PATCH 0/3] symref rename/delete fixes

From
Miklos Vajna <vmiklos@frugalware.org>
Date
Oct 27, 2008, 08:50 UTC
Message-ID
<20081027085055.GL2273@genesis.frugalware.org>
In-Reply-To
<7vhc6yioyq.fsf@gitster.siamese.dyndns.org>
On Sun, Oct 26, 2008 at 10:31:09PM -0700, Junio C Hamano <gitster@pobox.com> wrote:
Show 21 quoted lines
> > Of course you can say that this should be handled by git-remote itself,
> > without using rename_ref() but that not seem to be a good solution to
> > me. (Workaround in the wrong layer, instead of a solution in a good
> > one.)
> 
> I do not think it is a workaround at all.
> 
> I would even say that the renaming of symref that "git remote rename"
> needs to do is fundamentally different from what rename_ref() is about,
> and trying to cram it into rename_ref() is a grave mistake.
> 
> If you "git remote rename origin upstream" when origin/HEAD points at
> refs/remotes/origin/master, you need to make the renamed one point at
> refs/remotes/upstream/master, as you will be renaming origin/master to
> upstream/master.
> 
> Normal "rename_ref()" would just rename the ref without touching its
> contents, and if you used it to implement "git remote rename", your
> upstream/HEAD would point at the old name "origin/master" that will
> disappear when rename is finished, wouldn't it?  I do not think it is
> useful.

Ah, I missed that. You convienced me, I'll post updated patches later today. :)

Previous: Junio C Hamano
Message 6 of 6 in “symref rename/delete fixes”
  1. 0/3 symref rename/delete fixesMiklos Vajna, Oct 26, 2008
  2. 1/3 Fix git branch -m for symrefs.Miklos Vajna, Oct 26, 2008
  3. 2/3 rename_ref(): handle the case when the reflog of a ref does not existMiklos Vajna, Oct 26, 2008
  4. 3/3 Fix git update-ref --no-deref -d.Miklos Vajna, Oct 26, 2008
  5. Junio C HamanoOct 27, 2008
  6. Miklos VajnaOct 27, 2008

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.