Re: Question about 'branch -d' safety

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

 



On Tue, 2010-07-13 at 10:30 +0200, Johannes Sixt wrote:
> With that in mind, shouldn't it be exactly the other way around, i.e.,
> dump the reflog (the objects are still referenced from HEAD's reflog), but
> keep the ref around in some attic, just in case the branch is so old that
> its reflog was empty and its objects would otherwise be pruned right away?
> 
> -- Hannes

It would probably be more sensible to add a "deleted" entry to the
reflog just prior to removing the ref (yes, this will make HEAD@{1}
equal to HEAD@{0} in many cases). Keeping the ref itself around in an
attic doesn't make sense - the reflog can act as a better "attic"
anyway, if we stop deleting nonempty reflogs just because they don't
have a live ref associated with them.

Having a separate "attic" just runs into problems of "what if you delete
the ref twice?" and adds an entirely separate mechanism for tracking
something which we already have a perfectly good method of tracking: the
previous state of a ref.

--
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]