Re: ghost refs

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Jeff King
Date: Tuesday, April 20, 2010 - 4:51 am

On Tue, Apr 20, 2010 at 07:02:05AM +0000, Yann Dirson wrote:


Almost. The complication is that a branch "foo" prevents any branch
"foo/bar" from being created. So if you leave the reflog in place, you
are blocking the creation of the reflog for a new branch.

So you need some solution to that problem. Things I thought of are:

  1. Leave the reflog in place until such a foo/bar branch is created.
     But that means branch creation unexpectedly kills off old unrelated
     reflog entries. Combingin user surprise and destruction of data is
     probably bad.

  2. Make a refs/dead hierarchy so that the reflogs don't interfere with
     new branches. This just pushes off the problem, though, for when
     you try to delete "foo/bar" and see that "refs/dead/foo" is already
     blocking its spot in the reflog graveyard.

  3. Stick everything in a big "graveyard" reflog. I think there are
     some complications here with the reflog format, though. Namely:

       - reflog entries don't actually name the ref they're on. We could
         munge the comment field to add the name of the ref as we put
         them in the graveyard ref.

       - entries just have a timestamp, and I think we assume they're in
         order. So I guess we can merge-sort the old graveyard ref with
         what we're adding to keep things in order. But it means you
         will have entries from various refs interspersed. I guess that
         is OK, though, as it's not unlike the HEAD reflog.

So (3) seems like the only viable option to me, but I would be happy to
hear alternatives.

-Peff
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
ghost refs, John Dlugosz, (Wed Apr 7, 9:38 am)
Re: ghost refs, Avery Pennarun, (Wed Apr 7, 9:58 am)
Re: ghost refs, Jeff King, (Wed Apr 7, 2:00 pm)
RE: ghost refs, John Dlugosz, (Wed Apr 7, 3:00 pm)
Re: ghost refs, Avery Pennarun, (Wed Apr 7, 3:03 pm)
RE: ghost refs, John Dlugosz, (Wed Apr 7, 3:10 pm)
Re: ghost refs, Avery Pennarun, (Wed Apr 7, 3:11 pm)
Re: ghost refs, Jeff King, (Wed Apr 7, 9:30 pm)
RE: ghost refs, John Dlugosz, (Thu Apr 8, 9:07 am)
Re: ghost refs, Junio C Hamano, (Thu Apr 8, 9:55 am)
Re: ghost refs, Jeff King, (Thu Apr 8, 12:49 pm)
Re: ghost refs, Junio C Hamano, (Thu Apr 8, 1:42 pm)
Re: ghost refs, Avery Pennarun, (Thu Apr 8, 3:14 pm)
Re: ghost refs, Nicolas Sebrecht, (Thu Apr 8, 4:04 pm)
Re: ghost refs, Jeff King, (Sat Apr 17, 4:51 am)
Re: ghost refs, Junio C Hamano, (Sat Apr 17, 9:32 am)
Re: Git documentation writing guidelines, Junio C Hamano, (Sat Apr 17, 5:28 pm)
RE: ghost refs, John Dlugosz, (Mon Apr 19, 8:33 am)
Re: ghost refs, Yann Dirson, (Tue Apr 20, 12:02 am)
Re: ghost refs, Jeff King, (Tue Apr 20, 4:51 am)
Re: ghost refs, Zefram, (Tue Apr 20, 5:02 am)
Re: ghost refs, Yann Dirson, (Tue Apr 20, 6:00 am)
Re: ghost refs, Zefram, (Tue Apr 20, 6:14 am)
Re: ghost refs, Jay Soffian, (Tue Apr 20, 6:33 am)
Re: ghost refs, Jeff King, (Tue Apr 20, 7:24 am)
Re: ghost refs, Yann Dirson, (Tue Apr 20, 7:42 am)
Re: ghost refs, Jay Soffian, (Tue Apr 20, 7:52 am)
Re: ghost refs, Alex Riesen, (Tue Apr 20, 8:03 am)
Re: ghost refs, Jeff King, (Tue Apr 20, 8:10 am)