Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGit / JGit » which git binary does EGit use
which git binary does EGit use [message #1767769] Tue, 11 July 2017 00:15 Go to next message
Greg Silverman is currently offline Greg SilvermanFriend
Messages: 7
Registered: July 2009
Junior Member
I have my workspace in a cygwin directory. I sometimes use git, version 2.12.3, from the command line and sometimes from within eclipse. In eclipse, git staging shows many files as modified, even though I have not modified them. From the command line, git does not show them as modified.

Why is this happening? Is EGit using a git binary that is incompatible with the one in cygwin?

The two attached png files show the difference in what EGit and git show for the working directory and staging.
Re: which git binary does EGit use [message #1767799 is a reply to message #1767769] Tue, 11 July 2017 08:41 Go to previous messageGo to next message
Christian Halstrick is currently offline Christian HalstrickFriend
Messages: 274
Registered: July 2009
Senior Member
EGit is not calling a git binary, it is using JGit. Such problems, that JGit on Windows thinks more files are modified than native git have to seen before. It is often a line-ending problem. JGit thinks that the files on disk differ from the files in the index only because they have different line-endings. The files on disk often have the windows cr-lf line endings, while the files in the index have unix style lf line endings. Just to prove that you could set core.autocrlf to false in your repos config, delete all the files in the worktree and checkout your branch again (with EGit). Is it still showing that many differences? That's not the solution, just trying to prove that my assumption is right.

Ciao
Chris
Re: which git binary does EGit use [message #1767800 is a reply to message #1767769] Tue, 11 July 2017 08:41 Go to previous messageGo to next message
Christian Halstrick is currently offline Christian HalstrickFriend
Messages: 274
Registered: July 2009
Senior Member
EGit is not calling a git binary, it is using JGit. Such problems, that JGit on Windows thinks more files are modified than native git have to seen before. It is often a line-ending problem. JGit thinks that the files on disk differ from the files in the index only because they have different line-endings. The files on disk often have the windows cr-lf line endings, while the files in the index have unix style lf line endings. Just to prove that you could set core.autocrlf to false in your repos config, delete all the files in the worktree and checkout your branch again (with EGit). Is it still showing that many differences? That's not the solution, just trying to prove that my assumption is right.

Ciao
Chris
Re: which git binary does EGit use [message #1767904 is a reply to message #1767800] Wed, 12 July 2017 05:57 Go to previous message
Thomas Wolf is currently offline Thomas WolfFriend
Messages: 576
Registered: August 2016
Senior Member
Another possible cause of such differences on Windows are executable bits; so check those. If that's the cause, set core.filemode to false in the git config.
Previous Topic:Behavior divergence between Git and JGit on binary merge
Next Topic:Improvement: commit message history combo
Goto Forum:
  


Current Time: Thu Apr 25 10:34:12 GMT 2024

Powered by FUDForum. Page generated in 0.03104 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top