git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Shawn Pearce <spearce@spearce.org>
To: Jakub Narebski <jnareb@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [RFC] Teach git-branch howto rename a branch
Date: Sat, 25 Nov 2006 03:57:31 -0500	[thread overview]
Message-ID: <20061125085731.GG4528@spearce.org> (raw)
In-Reply-To: <ek9078$m2j$1@sea.gmane.org>

Jakub Narebski <jnareb@gmail.com> wrote:
> Shawn Pearce wrote:
> 
> > 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.

Yes, I think that's a worthwhile thing to log.  Problem is the
logging system tends to throw away pointless entries (sha1 ->
same sha1) so the rename log entry needs to be forced somehow...

Although without a UI to show the content of the reflog having the
rename entry in there isn't all that critical.
 
> > 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.

Yes, that's one of the complex parts of it. :-)

-- 

  reply	other threads:[~2006-11-25  8:57 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-24 23:03 [RFC] Teach git-branch howto rename a branch Lars Hjemli
2006-11-25  5:40 ` Junio C Hamano
2006-11-25  6:49   ` Shawn Pearce
2006-11-25  8:53     ` Jakub Narebski
2006-11-25  8:57       ` Shawn Pearce [this message]
2006-11-25  9:16         ` Lars Hjemli
2006-11-25 10:35           ` Junio C Hamano
2006-11-25 10:52             ` Lars Hjemli
2006-11-25  7:12   ` [PATCH] git-branch -D: make it work even when on a yet-to-be-born branch Junio C Hamano
2006-11-25  8:52   ` [RFC] Teach git-branch howto rename a branch Lars Hjemli
2006-11-25 10:39 ` Fredrik Kuivinen
2006-11-25 11:00   ` Lars Hjemli
2006-11-26 23:56 ` Josef Weidendorfer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20061125085731.GG4528@spearce.org \
    --to=spearce@spearce.org \
    --cc=git@vger.kernel.org \
    --cc=jnareb@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).