You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a .gitattibutes with :
.githooks/** text eol=lf
I have a file named .githooks/commit-msg.
I check icon to "Show whitespace characters". My file has only LF.
I perform a change in this file and save it. It appears in "Unstaged Changes" in "Git Staging" part.
When I double click on it in "Git Staging" part, the comparison editor show the git ancestor with CRLF instead of LF (but LF for my local file), and therefore find false white space changes on each line.
But if in History part, I double click on a commit, the comparison editor show the git ancestor with LF, which is correct.
Actual behavior
When I double click on it in "Git Staging" part, the comparison editor show the git ancestor with CRLF instead of LF (but LF for my local file), and therefore find false white space changes on each line.
Expected behavior
When I double click on it in "Git Staging" part, the comparison editor should show the git ancestor with LF due to my .gitattribute and should be coherent with a double clic on a commit in the History part.
Relevant log output
No response
Other information
No response
The text was updated successfully, but these errors were encountered:
* text=auto
*.java text
*.yaml text
*.yml text
*.xml text
*.json text
*.md text
*.txt text
*.properties text eol=crlf
*.tar text=false
*.zip text=false
*.gpg text=false
*.gz text=false
*.jpg text=false
*.png text=false
*.tgz text=false
/src/test/resources/**/* text=false
I can confirm that the repository does contain the files with LF only, as does my working copy, and as far as I can trust my local git command line, so does the index with my staged changes.
Yet in EGit all the files always show up like this if Ignore Whitespace is off, with CRLF on the staged end, when comparing working copy and index:
When comparing index and upstream, both show as CRLF, which at least makes the diff view more usable.
Version
6.10.0
Operating System
Windows
Eclipse version
2024-06
Bug description
I have a .gitattibutes with :
.githooks/** text eol=lf
I have a file named .githooks/commit-msg.
I check icon to "Show whitespace characters". My file has only LF.
I perform a change in this file and save it. It appears in "Unstaged Changes" in "Git Staging" part.
When I double click on it in "Git Staging" part, the comparison editor show the git ancestor with CRLF instead of LF (but LF for my local file), and therefore find false white space changes on each line.
But if in History part, I double click on a commit, the comparison editor show the git ancestor with LF, which is correct.
Actual behavior
When I double click on it in "Git Staging" part, the comparison editor show the git ancestor with CRLF instead of LF (but LF for my local file), and therefore find false white space changes on each line.
Expected behavior
When I double click on it in "Git Staging" part, the comparison editor should show the git ancestor with LF due to my .gitattribute and should be coherent with a double clic on a commit in the History part.
Relevant log output
No response
Other information
No response
The text was updated successfully, but these errors were encountered: