Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 334248 - Synchronization shows too many files
Summary: Synchronization shows too many files
Status: RESOLVED FIXED
Alias: None
Product: EGit
Classification: Technology
Component: UI (show other bugs)
Version: 0.10.0   Edit
Hardware: PC Windows XP
: P3 critical with 6 votes (vote)
Target Milestone: 2.0   Edit
Assignee: Dariusz Luksza CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 301775 377973
Blocks:
  Show dependency tree
 
Reported: 2011-01-13 06:37 EST by Szymon Brandys CLA
Modified: 2012-06-12 09:20 EDT (History)
10 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Szymon Brandys CLA 2011-01-13 06:37:39 EST
Eclipse SDK 
Version: 3.7.0
Build id: I20110104-0920

EGit
Version: 0.10.1

Steps:
1) I have MSGit installed, I cloned http://git.eclipse.org/gitroot/e4/org.eclipse.orion.server.git using Git Bash

2) Imported projects from the cloned repo to my workspace using 'Import > General > Existing Project into Workspace'

3) Shared one of added projects using 'Team > Share > Git'

4) I did not change anything in the project and did 'Team > Synchronize'

See that all files and folders are shown in Sync View. The difference is whitespace characters.

When I do 'git status' in Git Bash it shows nothing to commit.
Comment 1 Tomasz Zarna CLA 2011-01-13 07:39:02 EST
5) When starting the sync "Include local uncommitted changes" option has been checked
Comment 2 Szymon Brandys CLA 2011-01-13 08:33:59 EST
Bumping up the severity since Sync View for Git in this particular case is useless.
Comment 3 Dariusz Luksza CLA 2011-01-29 16:08:16 EST
Issue with line endings was discussed on EGit mailing list, you can find this thread here:
http://dev.eclipse.org/mhonarc/lists/egit-dev/msg01731.html
Comment 4 Dariusz Luksza CLA 2011-02-24 19:32:39 EST
(In reply to comment #2)
Szymon, can you check solution suggested in this email:
http://dev.eclipse.org/mhonarc/lists/egit-dev/msg01738.html

This is rather problem of Git configuration not a issue in EGit Synchronize View
Comment 5 Matthias Sohn CLA 2011-05-15 17:16:51 EDT
ping, any update here ?
Comment 6 e.tadeu CLA 2011-08-04 06:59:18 EDT
I'm having the same problem... "git diff" is ok, but the Synchronize view is not handling autocrlf and is displaying differences only in end-of-line characters. Note that I want to have autocrlf set as True.
Comment 7 Marc CLA 2012-03-07 12:38:58 EST
Eclipse 3.7.1
Build id: M20110909-1335

EGit 1.3.0.201202151440-r

Cloned a new project, imported, shared.

Using Synchronize shows all files as being 'changed locally'.
Using "git status" shows no local changes.

Checked configuration and core.autoclrf=true.
Comment 8 Jason Huntley CLA 2012-04-04 12:28:11 EDT
I've also witnessed this on several occasions as well. Very annoying to deal with synchronizing workspaces. I always find myself reverting back to native git to see true changes and not just files that differ by a space or two.
Comment 9 Marc CLA 2012-04-04 12:40:34 EDT
(In reply to comment #7)
> Eclipse 3.7.1
> Build id: M20110909-1335
> 
> EGit 1.3.0.201202151440-r
> 
> Cloned a new project, imported, shared.
> 
> Using Synchronize shows all files as being 'changed locally'.
> Using "git status" shows no local changes.
> 
> Checked configuration and core.autoclrf=true.

I fixed this by blowing out all of my files from my .git maintained location and using the .git to recreate my project. (Hard Reset)
Comment 10 Robin Rosenberg CLA 2012-04-14 10:23:50 EDT
Can you validate this report against the 2.0 snapshot?
Comment 11 Dariusz Luksza CLA 2012-04-27 15:34:23 EDT
There is another corner case in which synchronize view could show files as changed when there are no changes in files content. Git apart from saving file deltas also have information about file mode (access rights) and when eg. execution flag was added/removed such change will appear in synchronize view. This is because jgit implementation don't ignore file access modifications, I'll provide a fix that would explicitly ignore files that have same sha-1 in working tree and repository
Comment 12 Robin Rosenberg CLA 2012-04-27 15:52:30 EDT
(In reply to comment #11)
> There is another corner case in which synchronize view could show files as
> changed when there are no changes in files content. Git apart from saving file
> deltas also have information about file mode (access rights) and when eg.
> execution flag was added/removed such change will appear in synchronize view.
> This is because jgit implementation don't ignore file access modifications,
> I'll provide a fix that would explicitly ignore files that have same sha-1 in
> working tree and repository

Shouldn't this be controlled by core.filemode? Only when false differences should
be ignored.
Comment 13 Dariusz Luksza CLA 2012-04-27 17:02:30 EDT
(In reply to comment #12)
> (In reply to comment #11)
> Shouldn't this be controlled by core.filemode? Only when false differences
> should
> be ignored.

Yes Robin, you are right. The TreeFilter.ANY_DIFF which is used in synchronize view should be aware of repository configuration, especially about mentioned core.filemode. I'll open separeate bug for this and provide a patch.
Comment 14 Dariusz Luksza CLA 2012-04-27 17:25:52 EDT
I've proposed, a fix https://git.eclipse.org/r/5755 with depends on another jgit change that allow read repository configuration for core.filemode option,  and based on this configuration ignores or respect changes in file mode.

We should also discuss how changes in filemode should be presented in synchronize view. Just listing them without any additional information is counterproductive.
Comment 15 Robin Rosenberg CLA 2012-06-07 18:05:31 EDT
Is this still an issue?
Comment 16 Matthias Sohn CLA 2012-06-12 09:20:20 EDT
merged as 95a23af59bb8edbc3e20dcf65dd4b1b0e9103132