Re: [RFC PATCH] Introduce "precious" file concept
- From
Duy Nguyen <pclouds@gmail.com>
- Date
- Dec 6, 2018, 18:39 UTC
- Message-ID
- <CACsJy8BJanw33m9ei3TFL+kt1OH3htUwemhSE=goUh=6py3+xg@mail.gmail.com>
- In-Reply-To
- <CA+P7+xri1=peNpEiZCE802HwCXhojyp2BDvOR+6BBSoRtsZyzA@mail.gmail.com>
On Tue, Nov 27, 2018 at 1:56 PM Jacob Keller <jacob.keller@gmail.com> wrote:
Show 5 quoted lines
> Personally, I would rather err on the side which requires the least > interaction from users to avoid silently clobbering an ignored file. > > Either Duy's solution with a sort of "untracked" reflog, or the > garbage/trashable notion.
The "untracked reflog" is partially functional now [1] if you want to have a look. I'm not going to post the series until post-2.20, but if you do look, I suggest the first patch that lays out the design and a plumbing command to manage it. Basically you'll do
git backup-log --id=worktree log <some-path>
then pick up the version you like with "git backup-log cat" and do whatever you want with it. High level UI is not there and will be a topic of discussion.
The precious/trashable/garbage notion can be used to suppress making backups.
[1] https://gitlab.com/pclouds/git/commits/backup-log
-- Duy