Re: Archiving off old branches

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

 



Jonathan Nieder <jrnieder@xxxxxxxxx> writes:

> Tim Chase wrote:
>
>>   cd .git/refs
>>   mkdir -p closed
>>   mv heads/BUG-123 closed
>
> That breaks with packed refs (see git-pack-refs(1)), which are a normal
> thing to encounter after garbage collection.

Specifically,

 - if BUG-123 branch was placed in packed-refs file in the past
   (which may be older than what you have right now at heads/BUG-123
   as a loose ref), the above procedure will still make it appear in
   your "git branch --list" output, pointing at a possibly old
   commit that may even have been pruned away.

 - if BUG-123 branch was placed in packed-refs file and you haven't
   touched that branch since then, heads/BUG-123 file would not
   exist, "mv" will fail, and you won't see closed/BUG-123 at the
   end of the procedure.

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