From: Dmitry Potapov <dpotapov@gmail.com>
To: Steffen Prohaska <prohaska@zib.de>
Cc: gitster@pobox.com, torvalds@linux-foundation.org, git@vger.kernel.org
Subject: Re: [PATCH] safecrlf: Add flag to convert_to_git() to disable safecrlf check
Date: Wed, 16 Jan 2008 02:03:12 +0300 [thread overview]
Message-ID: <20080115230312.GB13984@dpotapov.dyndns.org> (raw)
In-Reply-To: <53A4FB98-25B5-4598-BED8-7D96AF5527F4@zib.de>
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
prev parent reply other threads:[~2008-01-15 23:03 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-13 16:30 [PATCH v3] safecrlf: Add mechanism to warn about irreversible crlf conversions Steffen Prohaska
2008-01-13 22:02 ` Dmitry Potapov
2008-01-13 22:13 ` Dmitry Potapov
2008-01-13 23:46 ` [PATCH] Don't display crlf warning twice Dmitry Potapov
2008-01-14 6:17 ` Steffen Prohaska
2008-01-14 6:40 ` Dmitry Potapov
2008-01-14 6:53 ` Steffen Prohaska
2008-01-14 23:20 ` [PATCH] safecrlf: Add flag to convert_to_git() to disable safecrlf check Steffen Prohaska
2008-01-14 23:58 ` Junio C Hamano
2008-01-15 20:52 ` Steffen Prohaska
2008-01-15 21:41 ` Steffen Prohaska
2008-01-15 23:23 ` Junio C Hamano
2008-01-15 10:26 ` Dmitry Potapov
2008-01-15 20:39 ` Steffen Prohaska
2008-01-15 23:03 ` Dmitry Potapov [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080115230312.GB13984@dpotapov.dyndns.org \
--to=dpotapov@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=prohaska@zib.de \
--cc=torvalds@linux-foundation.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.
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 NNTP newsgroup(s).