git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Applying .gitattributes text/eol changes
@ 2011-01-03 17:18 Marc Strapetz
  2011-01-11  9:29 ` Marc Strapetz
  2011-01-11 12:11 ` Michael J Gruber
  0 siblings, 2 replies; 11+ messages in thread
From: Marc Strapetz @ 2011-01-03 17:18 UTC (permalink / raw)
  To: git

I'm looking for an unobtrusive way to apply (committed) changes for
text/eol attributes to the working tree. For instance, after having
changed "*.txt eol=crlf" to "*.txt eol=lf", all *.txt files should be
converted from CRLF to LF endings. The only advice I found so far is to
remove .git/index and do a reset --hard. The disadvantage of this
approach is that every file will be touched:

- although the content does not change, timestamps will be changed. This
makes tools like IDEs assume that the file content has been changed.
(Even if the timestamps would be properly reset, the replacement of the
files would have triggered system file change notifications and I'd
expect various tools to still reload these files)

- there will be warnings for files which are locked by other processes
(at least on Windows). I'm usually seeing this for JAR files which are
not affected by eol-attribute changes at all.

One solution I could think of which might be helpful in other situations
as well would be to have an "--unobtrusive" option for reset which would
only replace a file if the content has actually been changed.

Marc.

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2011-01-14  9:06 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-03 17:18 Applying .gitattributes text/eol changes Marc Strapetz
2011-01-11  9:29 ` Marc Strapetz
2011-01-11 12:11 ` Michael J Gruber
2011-01-11 14:02   ` Marc Strapetz
2011-01-13 13:23     ` Michael J Gruber
2011-01-13 14:28       ` Marc Strapetz
2011-01-13 14:37         ` Michael J Gruber
2011-01-13 14:57           ` Marc Strapetz
2011-01-13 23:30             ` Junio C Hamano
2011-01-14  8:31               ` Michael J Gruber
2011-01-14  9:05               ` Marc Strapetz

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).