From: Sitaram Chamarty <sitaramc@gmail.com>
To: Jeff King <peff@peff.net>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: can we prevent reflog deletion when branch is deleted?
Date: Thu, 14 Nov 2013 21:36:42 +0530 [thread overview]
Message-ID: <5284F512.1090303@gmail.com> (raw)
In-Reply-To: <20131114081456.GC16327@sigill.intra.peff.net>
On 11/14/2013 01:44 PM, Jeff King wrote:
> 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:
>
> http://thread.gmane.org/gmane.comp.version-control.git/201715/focus=201752
>
> 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
>> namespace.
>
> 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.
The use cases I am talking about are those where someone deleted
something and it was noticed well within Git's the earliest of Git's
expire timeouts.
So, no need to worry about expiry times and connecting it with object
pruning. Really, just the eqvt of a "cp" or "mv" of one file is all
that most people need.
Gitolite's log is the same. So no one who uses Gitolite needs this
feature. But people shouldn't have to install Gitolite or anything else
just to get this either!
prev parent reply other threads:[~2013-11-14 16:07 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-01 1:31 can we prevent reflog deletion when branch is deleted? Sitaram Chamarty
2013-06-01 3:00 ` Michael Haggerty
2013-06-01 5:03 ` Jeff King
2013-06-01 7:59 ` Ramkumar Ramachandra
2013-06-01 9:09 ` Jeff King
2013-06-01 9:47 ` Ramkumar Ramachandra
2013-06-01 17:25 ` Sitaram Chamarty
2013-06-01 17:56 ` Ramkumar Ramachandra
2013-06-02 10:20 ` Sitaram Chamarty
2013-11-14 0:18 ` Sitaram Chamarty
2013-11-14 7:56 ` Thomas Rast
2013-11-14 8:07 ` Jeff King
2013-11-14 10:56 ` Sitaram Chamarty
2013-11-14 11:09 ` Jeff King
2013-11-14 11:17 ` Luca Milanesio
2013-11-14 13:48 ` Sitaram Chamarty
2013-11-14 13:47 ` Sitaram Chamarty
2013-11-14 8:14 ` Jeff King
2013-11-14 14:42 ` Stephen Bash
2013-11-14 16:20 ` Sitaram Chamarty
2013-11-14 16:06 ` Sitaram Chamarty [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5284F512.1090303@gmail.com \
--to=sitaramc@gmail.com \
--cc=git@vger.kernel.org \
--cc=peff@peff.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).