Re: [PATCH] logging branch deletion to help recovering from mistakes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jeff King <peff@xxxxxxxx> wrote:
> On Tue, Dec 07, 2010 at 10:14:19AM -0800, Shawn O. Pearce wrote:
> 
> > Per check-ref-format, ref names cannot contain two dots.  We could
> > archive ref logs by renaming them, $GIT_DIR/logs/refs/heads/foo
> > becomes $GIT_DIR/logs/refs/heads/foo..deleted-1.  If foo is created
> > and deleted again, it becomes foo..deleted-2.
...
> > A different approach might be to have $GIT_DIR/logs/refs/REF_ATTIC,
> 
> That seems a lot less efficient, as we have to linearly search all of
> REF_ATTIC to get:
> 
>   1. the reflog for one deleted branch
> 
>   2. the list of deleted branches
> 
> Neither of those is probably particularly performance critical, but it
> just seems like keeping the logs in files indexed by the original ref
> names is a more natural fit.

Yea, I'm leaning more towards the foo..deleted-n idea too, for the
same reasons.  It also makes it easier to GC a deleted branch's
reflog, we can examine the last record's timestamp in a reasonable
time bound and unlink the log if its really freaking old.

-- 
Shawn.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]