Re: [PATCH 1/1] Introduce "precious" file concept

2019-02-22 Thread Junio C Hamano
Duy Nguyen writes: > On Thu, Feb 21, 2019 at 5:39 AM Junio C Hamano wrote: >> > So now you would need to >> > add more or less the same set of ignore rules in .gitattributes to >> > mark them trashable, and gitignore/gitattributes rules are not exactly >> > compatible, you can't just blindly cop

Re: [PATCH 1/1] Introduce "precious" file concept

2019-02-22 Thread Duy Nguyen
On Wed, Feb 20, 2019 at 6:11 PM Clemens Buchacher wrote: > >And requiring to mark trashable files manually duplicates a > >lot of ignore patterns. Have a look at any .gitignore file, the > >majority of them is for discardable files because "ignored" class was > >created with those in mind (*.o and

Re: [PATCH 1/1] Introduce "precious" file concept

2019-02-22 Thread Duy Nguyen
On Thu, Feb 21, 2019 at 5:39 AM Junio C Hamano wrote: > > So now you would need to > > add more or less the same set of ignore rules in .gitattributes to > > mark them trashable, and gitignore/gitattributes rules are not exactly > > compatible, you can't just blindly copy them over. Every time you

Re: [PATCH 1/1] Introduce "precious" file concept

2019-02-20 Thread Junio C Hamano
Duy Nguyen writes: > There is a trade off somewhere. "new user first" should not come at > the cost for more experienced users. Probably. Nobody will stay being newbie forever. > Making "git checkout/merge" abort while it's working before breaks > scripts. And requiring to mark trashable files

Re: [PATCH 1/1] Introduce "precious" file concept

2019-02-20 Thread Junio C Hamano
Duy Nguyen writes: > - surprises sometimes, but in known classes. This is the main use > case of backup log, where I may accidentally do "git commit > -amsomething" after carefully preparing the index. Saving overwritten > files by merge/checkout could be done here as an alternative to > "garbag

Re: [PATCH 1/1] Introduce "precious" file concept

2019-02-20 Thread Clemens Buchacher
On February 20, 2019 10:41:51 AM GMT+01:00, Duy Nguyen wrote: >Making "git checkout/merge" abort while it's working before breaks >scripts. Change is always a trade-off. We should not reject change without considering the merits. Once we agree on the desired state, we can think about the mi

Re: [PATCH 1/1] Introduce "precious" file concept

2019-02-20 Thread Ævar Arnfjörð Bjarmason
On Wed, Feb 20 2019, Duy Nguyen wrote: > On Wed, Feb 20, 2019 at 4:19 PM Ævar Arnfjörð Bjarmason > wrote: >> > I personally do not believe in "backup log"; if we can screw up and >> > can fail to stop an operation that must avoid losing info, then we >> > can screw up the same way and fail to d

Re: [PATCH 1/1] Introduce "precious" file concept

2019-02-20 Thread Steffen Jost
On 20.02.19 10:19, Ævar Arnfjörð Bjarmason wrote: Most git users are at the level of only knowing very basic add/commit/pull/push command interaction. I feel strongly that we need to make our tools safe to use by default, and not require some relatively advanced "precious"/attribute facility to b

Re: [PATCH 1/1] Introduce "precious" file concept

2019-02-20 Thread Duy Nguyen
On Wed, Feb 20, 2019 at 4:19 PM Ævar Arnfjörð Bjarmason wrote: > > I personally do not believe in "backup log"; if we can screw up and > > can fail to stop an operation that must avoid losing info, then we > > can screw up the same way and fail to design and implement "backup" > > to save info bef

Re: [PATCH 1/1] Introduce "precious" file concept

2019-02-20 Thread Ævar Arnfjörð Bjarmason
On Tue, Feb 19 2019, Junio C Hamano wrote: > Duy Nguyen writes: > >> On Sun, Feb 17, 2019 at 2:36 AM Ævar Arnfjörð Bjarmason >> wrote: >>> >>> >>> On Sat, Feb 16 2019, Nguyễn Thái Ngọc Duy wrote: >>> >>> [Re-CC some people involved the last time around] >>> >>> > A new attribute "precious" is

Re: [PATCH 1/1] Introduce "precious" file concept

2019-02-20 Thread Clemens Buchacher
On February 20, 2019 2:35:41 AM GMT+01:00, Duy Nguyen wrote: >On Wed, Feb 20, 2019 at 1:08 AM Junio C Hamano >wrote: >> >> Duy Nguyen writes: >> >> > On Sun, Feb 17, 2019 at 2:36 AM Ævar Arnfjörð Bjarmason >> > wrote: >> >> >> >> >> >> On Sat, Feb 16 2019, Nguyễn Thái Ngọc Duy wrote: >> >> >

Re: [PATCH 1/1] Introduce "precious" file concept

2019-02-19 Thread Duy Nguyen
On Wed, Feb 20, 2019 at 1:08 AM Junio C Hamano wrote: > > Duy Nguyen writes: > > > On Sun, Feb 17, 2019 at 2:36 AM Ævar Arnfjörð Bjarmason > > wrote: > >> > >> > >> On Sat, Feb 16 2019, Nguyễn Thái Ngọc Duy wrote: > >> > >> [Re-CC some people involved the last time around] > >> > >> > A new attr

Re: [PATCH 1/1] Introduce "precious" file concept

2019-02-19 Thread Junio C Hamano
Duy Nguyen writes: > On Sun, Feb 17, 2019 at 2:36 AM Ævar Arnfjörð Bjarmason > wrote: >> >> >> On Sat, Feb 16 2019, Nguyễn Thái Ngọc Duy wrote: >> >> [Re-CC some people involved the last time around] >> >> > A new attribute "precious" is added to indicate that certain files >> > have valuable co

Re: [PATCH 1/1] Introduce "precious" file concept

2019-02-18 Thread Duy Nguyen
On Mon, Feb 18, 2019 at 4:53 PM Ævar Arnfjörð Bjarmason wrote: > > > On Sun, Feb 17 2019, Duy Nguyen wrote: > > > On Sun, Feb 17, 2019 at 2:36 AM Ævar Arnfjörð Bjarmason > > wrote: > >> > >> > >> On Sat, Feb 16 2019, Nguyễn Thái Ngọc Duy wrote: > >> > >> [Re-CC some people involved the last time

Re: [PATCH 1/1] Introduce "precious" file concept

2019-02-18 Thread Ævar Arnfjörð Bjarmason
On Sun, Feb 17 2019, Duy Nguyen wrote: > On Sun, Feb 17, 2019 at 2:36 AM Ævar Arnfjörð Bjarmason > wrote: >> >> >> On Sat, Feb 16 2019, Nguyễn Thái Ngọc Duy wrote: >> >> [Re-CC some people involved the last time around] >> >> > A new attribute "precious" is added to indicate that certain files

Re: [PATCH 1/1] Introduce "precious" file concept

2019-02-17 Thread Duy Nguyen
On Sun, Feb 17, 2019 at 2:36 AM Ævar Arnfjörð Bjarmason wrote: > > > On Sat, Feb 16 2019, Nguyễn Thái Ngọc Duy wrote: > > [Re-CC some people involved the last time around] > > > A new attribute "precious" is added to indicate that certain files > > have valuable content and should not be easily di

Re: [PATCH 1/1] Introduce "precious" file concept

2019-02-16 Thread Ævar Arnfjörð Bjarmason
On Sat, Feb 16 2019, Nguyễn Thái Ngọc Duy wrote: [Re-CC some people involved the last time around] > A new attribute "precious" is added to indicate that certain files > have valuable content and should not be easily discarded even if they > are ignored or untracked. > > So far there are one pa

[PATCH 1/1] Introduce "precious" file concept

2019-02-16 Thread Nguyễn Thái Ngọc Duy
A new attribute "precious" is added to indicate that certain files have valuable content and should not be easily discarded even if they are ignored or untracked. So far there are one part of Git that are made aware of precious files: "git clean" will leave precious files alone. Signed-off-by: Ng