Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [git] Line Endings *sigh*

After long struggles in the Eclipse top-level project we settled on the following approach:

http://wiki.eclipse.org/Platform-releng/Git_Workflows#Dealing_with_line_terminators

See the referenced mailing list discussions for more background on the reason to avoid relying on autocrlf. Note to clean up a mess you can also do the following:

- Select multiple projects in Eclipse
- File > Convert Line Delimiters to > Unix.
- Commit/push the changes

Eclipse's built in detection of binary vs. text files is quite good - at least much better than Git will do out of the box.

Resorting to git-filter-branch is quite a drastic measure. This destroys all existing commit records and can cause major problems if all team members don't correctly re-clone afterwards.  That seems like a last resort option, unless you have only done the conversion to Git very recently and aren't worried about starting over.

John



Stefan Winkler <news@xxxxxxxxxxxxxx>
Sent by: git-bounces@xxxxxxxxxxx

11/21/2011 03:22 PM

Please respond to
"Git related discussions,        specifcally migration help for projects at Eclipse.org"        <git@xxxxxxxxxxx>

To
git@xxxxxxxxxxx
cc
Subject
[git] Line Endings *sigh*





Hi list,

We seem to have some trouble using our migrated (SVN -> Git) CDO Project
repository with EGit. Sometimes clean files seem to be dirty in EGit
while git status at the command line reports a clean repo.

Our developers are mostly on Windows (I'm on Mac, though). We have all
set autocrlf to true. A recent analysis revealed that we have
2,929 Java source files with Unix line endings and
980 Java source files with DOS line endings

Now our basic idea would be to do a history clean once and for all using
git filter-branch -tree-filter 'convert_whole_tree_to_unix.sh' -- --all

(and let all developers clone from the server again ...)

Does this seem reasonable?
Will that make our problems go away?
Does the autocrlf setting of the master repo have any effect?
Does the autocrly setting of the repo which is tree-filtered as above
have any effect (would I better switch of autocrlf during the
tree-filter operation?)

Cheers,
Stefan

_______________________________________________
git mailing list
git@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/git



Back to the top