git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: There should be a `.gitbless; file, protecting files from git clean

From
Duy Nguyen <pclouds@gmail.com>
Date
Jan 29, 2019, 01:00 UTC
Message-ID
<CACsJy8AjMamr3kNf67SkYxKrDPHWcf=W2eArMRMnX3H6hXWe7A@mail.gmail.com>
In-Reply-To
<etPan.5c4f2017.992f4fd.4d5@zdharma.org>

On Mon, Jan 28, 2019 at 10:30 PM Sebastian Gniazdowski <psprint@zdharma.org> wrote:

Show 13 quoted lines
>
>
>
> On 28 stycznia 2019 at 06:05:31, Duy Nguyen (pclouds@gmail.com) wrote:
> > There's a patch that adds "precious" git attribute [1]. I was going to
> > resend once the backup-log [2] got reviewed but I might just send it
> > separately to handle the "git clean" case alone.
> >
> > [1] https://public-inbox.org/git/20181111095254.30473-1-pclouds@gmail.com/
> > [2] https://public-inbox.org/git/20181209104419.12639-1-pclouds@gmail.com/
>
>
> The backup log, if done properly, could allow to use git more freely, without nerves that something will beak. I wonder if it could restore also the state before an improper `git clea -dxf' call? I think the chances are low, because this would requrire to save untracked files, but it's worth asking?

backup-log already saves untracked files for "git reset --hard" support if I remember correctly. Adding support for "git clean" is not that big a deal. It's just the matter whether to turn it on by default (because there will be a lot of files being backed up). But now that I think about it, if backup log is enabled, perhaps we allow "git clean -dx" (without -f or -i) which will back up all deleted files, while -fdx will not. Hmm...

-- 
Duy
Previous: Sebastian GniazdowskiNext: Junio C Hamano
Message 7 of 8 in “There should be a `.gitbless; file, protecting files from git clean”
  1. Sebastian GniazdowskiJan 28, 2019
  2. Duy NguyenJan 28, 2019
  3. Sebastian GniazdowskiJan 28, 2019
  4. Duy NguyenJan 29, 2019
  5. Sebastian GniazdowskiJan 28, 2019
  6. Sebastian GniazdowskiJan 28, 2019
  7. Duy NguyenJan 29, 2019
  8. Junio C HamanoJan 28, 2019

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.