[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [git] Line Endings *sigh*
|
Hi John,
thanks for the hints. We are planning a git filter-branch operation
anyways for the next weeks (we want to get rid of a few deprecated big
files. That would shrink our repo by 30% (unpacked!) and I guess a lot
more packed (as the removed files are binaries). The advantage is that
also historic commits will be consistent wrt line endings.
But your argument about binary and text files is a good heads-up. I'd
have to be sure that only text files get converted ...
So, once again the question: does anyone know if the command-line native
git filter-branch uses/interferes with the autocrlf setting of the
repository? Do I need to set it in a special way to be sure the
conversion is done properly?
Cheers,
Stefan
Am 21.11.11 22:01, schrieb John Arthorne:
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
_______________________________________________
git mailing list
git@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/git