Subject: Re: Archiving off old branches

From: Junio C Hamano <[email-masked]>
Date: Wed, 23 Apr 2014 10:43:07 -0700

Tim Chase <[email-masked]> writes:

> Reading up on "git help update-ref", it states that it updates the
> name "safely".

I think that description is well intended but is misleading.  There
are many potential sources of risk, and the "safely" refers to
protection against a particular kind of risk: updating from a value
that you did not intend to (i.e. you examined and decided the update
is good, time passes while somebody else might have mucked with the
ref, and then you execute the update you decided to do).  And the
safety afforded to you is with "git update-ref ref newvalue oldvalue"
that makes sure the ref still points at the oldvalue and refuses to
update it to newvalue if it doesn't.