Re: Keep reflogs for deleted (remote tracking) branches?
- From
Han-Wen Nienhuys <hanwen@google.com>
- Date
- Mar 8, 2022, 11:54 UTC
- Message-ID
- <CAFQ2z_Oht=-QrzoH8FW_Jm-B7u9O0wXUaY-ifwZah6gkcgVVSA@mail.gmail.com>
- In-Reply-To
- <CAPMMpog=qBwLrxss_ci6ZMM+AjbdrF8tszXLW7YH1Zqr+m7mPQ@mail.gmail.com>
On Tue, Mar 8, 2022 at 12:28 PM Tao Klerks <tao@klerks.biz> wrote:
Show 13 quoted lines
> As far as I can tell, even "core.logAllRefUpdates=always" does *not* > keep any reflog entries around, even temporarily (until reflog > expiry), once a ref is deleted - do I understand that correctly? Is > this behavior intentional / reasoned, or just a consequence of the > fact that it's *hard* to keep "managing" per-branch reflogs for > branches that don't exist? > > I am planning a workaround using server hooks to "back up" refs that > are being deleted from specific namespaces, in my specific case, and I > imagine that a system like github keeps track of deleted stuff itself > for a while, but I find this "per-ref reflog disappearance" behavior > puzzling / out-of-character, so wanted to make sure I'm not missing > something.
I think this behavior is motivated by directory/file conflicts. If you have a reflog file in refs/logs/foo, you can't create a reflog for refs/foo/bar, because that would live in refs/logs/foo/bar
At Google, we keep reflogs in a completely different storage system altogether, which avoids this problem, and I wouldn't be surprised if other large hosting providers do something similar.
-- Han-Wen Nienhuys - Google Munich I work 80%. Don't expect answers from me on Fridays.