Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [egit-dev] bug for egit synchronize view showing diff when there are no real diff - git status "fixes" it

On 7 Nov 2014, at 13:38, Matthias Sohn wrote:

On Fri, Nov 7, 2014 at 9:23 AM, Max Rydahl Andersen <manderse@xxxxxxxxxx>
wrote:

Hey,

I'm trying to figure out the proper fix for this issue
https://www.eclipse.org/forums/index.php/t/460751/
which is that egit synchronize view shows a tons of "conflicting changes"
when there in reality are only one change.

The reproducible test I have is as follows:

git clone https://github.com/joshuawilson/snowdrop-examples
cd snowdrop-examples
git fetch origin snowdrop-less
git co snowdrop-less

git status  shows no changes.

Now import the project in eclipse and use synchronize view.

Now multiple files shows up as conflicting changes.


I just tried this example using Eclipse Jee package Mars M2 with EGit 3.5.1
on Mac
and it all worked fine and synchronize doesn't show any conflicting
changes.


Why ?

Then I run 'git status' on the command a few times and voila, egit
synchronize view now shows the correct state: no changes.

Is this a known issue ? what is the git status command doing that makes
egit conform to reality ?


git status sometimes has the side effect to update the git index:
If some file is detected to be racily clean [1] by git its git index entry
is marked smudged to signal git
that it shouldn't rely on lastModified timestamp for this file. A
subsequent git status typically unsmudges
the index entry.

[1] https://www.kernel.org/pub/software/scm/git/docs/technical/racy-git.txt


That's not ..nice..

Problem is that the user that actually reported the issue does not even get better result with git status.

It just keeps being different.

Turns out it is only for me git status "fixes" it.

He still sees this branch has having alot of differences shown in egit where git diff on cli does not see them.

So from user perspective egit looks faulty.

Any idea what settings we can try tweak on to get it fixed ?
/max
http://about.me/maxandersen


Back to the top