git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Duy Nguyen <pclouds@gmail.com>
To: Sebastian Gniazdowski <psprint@zdharma.org>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: There should be a `.gitbless; file, protecting files from git clean
Date: Tue, 29 Jan 2019 08:00:43 +0700	[thread overview]
Message-ID: <CACsJy8AjMamr3kNf67SkYxKrDPHWcf=W2eArMRMnX3H6hXWe7A@mail.gmail.com> (raw)
In-Reply-To: <etPan.5c4f2017.992f4fd.4d5@zdharma.org>

On Mon, Jan 28, 2019 at 10:30 PM Sebastian Gniazdowski
<psprint@zdharma.org> wrote:
>
>
>
> 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

  reply	other threads:[~2019-01-29  1:01 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-28  2:41 There should be a `.gitbless; file, protecting files from git clean Sebastian Gniazdowski
2019-01-28  5:05 ` Duy Nguyen
2019-01-28  5:24   ` Sebastian Gniazdowski
2019-01-29  0:48     ` Duy Nguyen
2019-01-28  6:23   ` Sebastian Gniazdowski
2019-01-28 15:30   ` Sebastian Gniazdowski
2019-01-29  1:00     ` Duy Nguyen [this message]
2019-01-28 18:08   ` Junio C Hamano

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CACsJy8AjMamr3kNf67SkYxKrDPHWcf=W2eArMRMnX3H6hXWe7A@mail.gmail.com' \
    --to=pclouds@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=psprint@zdharma.org \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).