Re: Question about 'branch -d' safety

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

 



Am 7/13/2010 10:00, schrieb Will Palmer:
> On Tue, 2010-07-13 at 09:13 +0200, Clemens Buchacher wrote:
>> Why would we need that? Even now, it is not enough to do "git
>> branch -D frotz; git gc --prune". You need to expire the reflog,
>> since HEAD may still have a reference to it. So instead you would
>> need
>>
>>  git branch -D frotz
>>  git reflog expire --expire=now HEAD frotz
>>  git gc --prune
>>
>> Purging a branch becomes just a special case of purging anything
>> from history.
> 
> With that in mind, would it not be enough to simply remove the ref, but
> not the reflog,

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