Re: [PATCH] safecrlf: Add flag to convert_to_git() to disable safecrlf check

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jan 15, 2008 at 09:39:00PM +0100, Steffen Prohaska wrote:
> 
> On Jan 15, 2008, at 11:26 AM, Dmitry Potapov wrote:
> 
> >but it also means that there is no longer
> >any warning when you are running git diff with the work tree,
> >which would be useful, because it is what most users do before
> >adding anything.
> 
> My first concern is to avoid data corruption.  But we should also
> avoid to unnecessarily bother users with annoying warnings. 

I don't think we bother users with unnecessary warnings. If there
is a problem then it is better to report it earlier than later,
and we *really* want that the user took some action, i.e. either
to mark this file as binary using .gitattributes or corrected its
endings. However, reporting the same problem twice during running
one command does not look nice...

> Thus
> I thought that guarding only the code paths that modify data in
> an irreversible way is sufficient and hence I only guarded the
> code path that writes to the repository.

This policy makes sense to me, it is just I would prefer if we
could find a way to warn a user a bit earlier...

> The underlying
> assumption is that git checkout is the only way of destroying the
> original data.  Unless you check out you still have the original
> data and can copy them to a safe place.

It is obvious to you but it may be not so obvious to a new user.
Running 'git diff' before check in is a common practice, so if
the warning was reported at that moment then he or she would not
check in.

Anyway, I like your solution for being simple and guarding the
most important pass reliably.

Dmitry
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux