On Thu, Nov 14, 2013 at 05:48:50AM +0530, Sitaram Chamarty wrote:
> Is there *any* way we can preserve a reflog for a deleted branch,
> perhaps under logs/refs/deleted/<timestamp>/full/ref/name ?
I had patches to do something like this here:
but there were definitely some buggy corners, as much of the code
assumed you needed to have a ref to have a reflog. I don't even run with
it locally anymore.
At GitHub, we log each change to an "audit log" in addition to the
regular reflog (we also stuff extra data from the environment into the
reflog message). So even after a branch is deleted, its audit log
entries remain, though you have to pull out the data by hand (git
doesn't know about it at all, except as an append-only sink for
writing). And git doesn't use the audit log for connectivity, either, so
eventually the objects could be pruned.
> Just some basic protection -- don't delete the reflog, and instead,
> rename it to something that preserves the name but in a different
That part is easy. Accessing it seamlessly and handling reflog
expiration are a little harder. Not because they're intractable, but
just because there are some low-level assumptions in the git code. The
patch series I mentioned above mostly works. It probably just needs
somebody to go through and find the corner cases.
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html