From: Jonathan Nieder <jrnieder@gmail.com>
To: "Henrik Grubbström" <grubba@roxen.com>
Cc: Junio C Hamano <gitster@pobox.com>, git@vger.kernel.org
Subject: Re: [PATCH v4 0/5] Patches to avoid reporting conversion changes.
Date: Thu, 3 Jun 2010 19:56:03 -0500 [thread overview]
Message-ID: <20100604005603.GA25806@progeny.tock> (raw)
In-Reply-To: <Pine.GSO.4.63.1006031543340.22466@shipon.roxen.com>
Hi Henrik,
Henrik Grubbström wrote:
> I believe that users typically aren't interested in if data in the
> repository is on normalized form or not (witness the autocrlf=true
> discussion a few weeks ago, where one of the main complaints was
> that it required a renormalization (which fg/autocrlf attempts to
> solve for that specific case by not normalizing)), as long as they
> get the expected content on checkout.
I agree. (In the case of autocrlf, it is also not very easy to
renormalize. The usual recommendation I have seen is "git rm -r \
--cached . && git add .", which is not exactly simple.)
> This set of patches allows for an incremental, on-demand normalization.
> Eg the user could switch the attributes for a group of files from
>
> *.bat -crlf
>
> (let's assume *.bat files use crlf linebreaks) to
>
> *.bat -crlf text eol=crlf
>
> and then have git normalize the individual files when there's
> actually a semantic reason for a change.
... but if I understand correctly, I don’t agree with this at all.
Imagine someone with an old copy of git that does not do
normalization. If you convert everything at once, she sees a single
enormous, semantically uninteresting cleanup patch (and she can check
the result with ‘diff -w’ or sed if suspicious). If you wait for some
real change to piggy-back onto, on the other hand, then the per-file
normalization patches will make it hard to find what changed.
Of course, very few people use such old copies of git. The real
problem is that git itself sees what this person would see; you are
asking to slow down everyone who tries to use diff or blame on your
repository by implicitly requiring the -w option.
> In my case, I have repositories containing files both requiring crlf
> and lf line endings, and additionally have expanded $Id$-strings
> that I want changed on first semantic change (but not before). To be
> able to use a
> git binary without this patchset I'd have to do a
>
> git commit -a -m 'Normalized'
>
> as the first thing after a checkout.
The Right Thing would be to not set the relevant attributes until it
is time for the file to be normalized. I can understand that that
might be hard and could require tool support.
This is not an argument against your patches, since I haven’t read
them (for all I know, they make everything better :)).
Regards,
Jonathan
next prev parent reply other threads:[~2010-06-04 0:55 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-01 14:41 [PATCH v4 0/5] Patches to avoid reporting conversion changes Henrik Grubbström (Grubba)
2010-06-01 14:41 ` [PATCH v4 1/5] sha1_file: Add index_blob() Henrik Grubbström (Grubba)
2010-06-01 14:41 ` [PATCH v4 2/5] strbuf: Add strbuf_add_uint32() Henrik Grubbström (Grubba)
2010-06-01 14:41 ` [PATCH v4 3/5] cache: Keep track of conversion mode changes Henrik Grubbström (Grubba)
2010-06-01 14:41 ` [PATCH v4 4/5] cache: Add index extension "CONV" Henrik Grubbström (Grubba)
2010-06-01 14:41 ` [PATCH v4 5/5] t/t0021: Test that conversion changes are detected Henrik Grubbström (Grubba)
2010-06-02 4:40 ` [PATCH v4 0/5] Patches to avoid reporting conversion changes Junio C Hamano
2010-06-03 16:00 ` Henrik Grubbström
2010-06-04 0:56 ` Jonathan Nieder [this message]
2010-06-04 11:59 ` Henrik Grubbström
2010-06-04 19:42 ` Jonathan Nieder
2010-06-06 10:50 ` Henrik Grubbström
2010-06-07 8:59 ` Finn Arne Gangstad
2010-06-07 16:37 ` Henrik Grubbström
2010-06-07 19:50 ` Finn Arne Gangstad
2010-06-08 15:52 ` Henrik Grubbström
2010-06-09 14:03 ` Finn Arne Gangstad
2010-06-09 18:04 ` Henrik Grubbström
2010-06-10 19:55 ` Finn Arne Gangstad
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=20100604005603.GA25806@progeny.tock \
--to=jrnieder@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=grubba@roxen.com \
/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).