From: Jeff King <peff@peff.net>
To: Jay Soffian <jaysoffian@gmail.com>
Cc: Yann Dirson <yann.dirson@bertin.fr>, git@vger.kernel.org
Subject: Re: ghost refs
Date: Tue, 20 Apr 2010 11:10:14 -0400 [thread overview]
Message-ID: <20100420151014.GA11785@coredump.intra.peff.net> (raw)
In-Reply-To: <g2u76718491004200752gcf73abf1se05e89bd605e77a@mail.gmail.com>
On Tue, Apr 20, 2010 at 10:52:42AM -0400, Jay Soffian wrote:
> On Tue, Apr 20, 2010 at 10:24 AM, Jeff King <peff@peff.net> wrote:
> > On Tue, Apr 20, 2010 at 09:33:42AM -0400, Jay Soffian wrote:
> > I like how the user would interact with that, but what happens with:
> >
> > git checkout -b topic/subtopic
> >
> > The reflog of the deleted branch is in the way.
>
> Handle it just as gracefully as we do today. This is what happens when
> you try to create a branch with a similar collision:
>
> $ git branch foo/bar
> $ git branch foo
> error: there are still refs under 'refs/heads/foo'
> fatal: Failed to lock ref for update: Is a directory
Yeah, but my next step would be "branch -d foo/bar"; under your proposal
that no longer works. Now I have to do "branch -m foo/bar foobar" where
"foobar" is some name that I know means "the old reflog for foo/bar".
So I think it makes more sense to come up with that naming scheme
ourselves and make using it semi-transparent.
> $ git branch topic/subtopic
> error: there are still logs under 'logs/refs/heads/topic'
> fatal: Failed to lock log for update: Is a directory
>
> I think it's an edge case; thus I think it's okay to fail as long as
> we give a reasonable error and a way to rename it.
It is an edge-case, but I'd rather just have a scheme that works nicely
in the normal case and "degrades" only in the error case. Like if
creating "foo/bar" we see that we have "foo", but that the last reflog
entry is deletion, we move "foo" to "foo-1" or something. It's ugly, but
it just doesn't come up that much.
-Peff
prev parent reply other threads:[~2010-04-20 15:10 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-07 16:38 ghost refs John Dlugosz
2010-04-07 16:58 ` Avery Pennarun
2010-04-07 21:00 ` Jeff King
2010-04-07 22:00 ` John Dlugosz
2010-04-07 22:03 ` Avery Pennarun
2010-04-07 22:10 ` John Dlugosz
2010-04-07 22:11 ` Avery Pennarun
2010-04-08 4:30 ` Jeff King
2010-04-08 16:07 ` John Dlugosz
2010-04-08 16:55 ` Junio C Hamano
2010-04-08 19:49 ` Jeff King
2010-04-08 20:42 ` Junio C Hamano
2010-04-08 22:14 ` Avery Pennarun
2010-04-08 23:04 ` Nicolas Sebrecht
2010-04-17 11:51 ` Jeff King
2010-04-17 16:32 ` Junio C Hamano
2010-04-17 16:57 ` Git documentation writing guidelines (was: Re: ghost refs) Jakub Narebski
2010-04-18 0:28 ` Git documentation writing guidelines Junio C Hamano
2010-04-19 15:33 ` ghost refs John Dlugosz
2010-04-20 7:02 ` Yann Dirson
2010-04-20 11:51 ` Jeff King
2010-04-20 12:02 ` Zefram
2010-04-20 13:00 ` Yann Dirson
2010-04-20 13:14 ` Zefram
2010-04-20 13:33 ` Jay Soffian
2010-04-20 14:24 ` Jeff King
2010-04-20 14:42 ` Yann Dirson
2010-04-20 14:52 ` Jay Soffian
2010-04-20 15:03 ` Alex Riesen
2010-04-20 15:10 ` Jeff King [this message]
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=20100420151014.GA11785@coredump.intra.peff.net \
--to=peff@peff.net \
--cc=git@vger.kernel.org \
--cc=jaysoffian@gmail.com \
--cc=yann.dirson@bertin.fr \
/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).