Linux上的Eclipse eGit拧紧行结尾

时间:2017-08-10 00:20:13

标签: eclipse git egit

由于行结尾的变化,提交看起来比它们应该大得多。

我有自我4.6.1.201703071140

在使用egit之前,命令

git ls-files --eol

显示

i/mixed w/mixed attr/                   somefile

然后,在Eclipse中通过git staging视图提交后,它是:

i/lf    w/mixed attr/                   somefile

另一个例子:

i/crlf  w/crlf  attr/                   somefile2

变为:

 i/lf    w/crlf  attr/                   somefile2

你可以看到egit正在将第一列改为i / lf。

在GitHub中,您可以使用?w = 1来抑制噪音,但我该如何解决问题呢?

git config

core.autocrlf=input
core.repositoryformatversion=0
core.filemode=true
core.logallrefupdates=true
remote.origin.url=https://github.com/plutext/docx4j.git
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
branch.master.remote=origin
branch.master.merge=refs/heads/master
branch.master.rebase=false

1 个答案:

答案 0 :(得分:1)

根据https://git-scm.com/book/en/v2/Customizing-Git-Git-Configuration

  

您可以告诉Git 在提交时将CRLF转换为LF ,但不能将core.autocrlf设置为input

您可能希望改为使用false