Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGit / JGit » Cannot resolve dirty folder (Win7)
Cannot resolve dirty folder (Win7) [message #837369] Thu, 05 April 2012 15:35 Go to next message
Steve Goodrich is currently offline Steve GoodrichFriend
Messages: 13
Registered: February 2010
Location: Colorado
Junior Member
Eclipse 3.7.1
CDT 8.0.1
EGit 1.3.0.201202151440-r

I have a CDT-based environment and we use git for our repositories. We've built EGit into the product, so now we have some wonderful "git" manipulation within the IDE.

On Linux this works wonderfully. After installation, the projects in the workspace get loaded when we first launch Eclipse and they show no dirty/staged/etc. decorations.

Not so much on Windows 7, though. Some of the files get installed with the wrong permissions (e.g. chmod values of 644 instead of 755 - discovered using "git diff" from the command line) and thus get marked "dirty" ('>' flag). OK, so that's an installer issue. No problem; we'll address that.

However, I cannot (or do not understand how to) clear the dirty flag. Within Eclipse I have tried reset (Soft, Mixed, and Hard) on the project and the dirty flag does not get cleared ("git diff" still shows permission differences).

Running "git reset --hard" from the command line does clean up the attributes (no more permission/file differences when running "git diff"), but the dirty flag is still set in the Project Explorer.

So... two questions:
1) How do I get Team > Reset > Hard to do the same in the IDE as "git reset --hard" does from the command line?
2) How do I get EGit to recognize that the workspace no longer has problems (and thus have it clear the dirty flag)?

I've only been using git for a month or two, so I'm relatively new to it. EGit I've only been using for a few weeks, so I'm less familiar with that side of things. Hence, don't be afraid to ask "noob" questions. It may be something quite simply that I've simply overlooked.

Thanks!
-- Steve G.
Re: Cannot resolve dirty folder (Win7) [message #844386 is a reply to message #837369] Sat, 14 April 2012 00:34 Go to previous messageGo to next message
Steve Goodrich is currently offline Steve GoodrichFriend
Messages: 13
Registered: February 2010
Location: Colorado
Junior Member
*Bump*

Does anyone have any ideas on this?

Thanks!
-- Steve G.
Re: Cannot resolve dirty folder (Win7) [message #844738 is a reply to message #837369] Sat, 14 April 2012 09:36 Go to previous message
Robin Rosenberg is currently offline Robin RosenbergFriend
Messages: 332
Registered: July 2009
Senior Member
Steve Goodrich skrev 2012-04-05 17.35:
> Eclipse 3.7.1
> CDT 8.0.1
> EGit 1.3.0.201202151440-r
>
> I have a CDT-based environment and we use git for our repositories. We've built EGit into the product, so now we have some wonderful "git" manipulation within the IDE.
>
> On Linux this works wonderfully. After installation, the projects in the workspace get loaded when we first launch Eclipse and they show no dirty/staged/etc. decorations.
>
> Not so much on Windows 7, though. Some of the files get installed with the wrong permissions (e.g. chmod values of 644 instead of 755 - discovered using "git diff" from the
> command line) and thus get marked "dirty" ('>' flag). OK, so that's an installer issue. No problem; we'll address that.
>
> However, I cannot (or do not understand how to) clear the dirty flag. Within Eclipse I have tried reset (Soft, Mixed, and Hard) on the project and the dirty flag does not
> get cleared ("git diff" still shows permission differences).
>
> Running "git reset --hard" from the command line does clean up the attributes (no more permission/file differences when running "git diff"), but the dirty flag is still set
> in the Project Explorer.
>
> So... two questions:
> 1) How do I get Team > Reset > Hard to do the same in the IDE as "git reset --hard" does from the command line?
> 2) How do I get EGit to recognize that the workspace no longer has problems (and thus have it clear the dirty flag)?

If this is related to line-endings, things may appear better in the 2.0 snapshot. You can give it a try. Egit 1.3 doesn't
support autocrlf.

Another option is to make sure your workspace is using LF only and set core.autocrlf false. On Windows (Git for Windows)
core.autocrlf is true by default, which means checked out files end with CRLF even if checked-in with LF. After changing
the core.autocrlf value perform a git reset --hard.

-- robin
Previous Topic:How to parse relative revision by JGit
Next Topic:egit does not accept ssh key
Goto Forum:
  


Current Time: Fri Apr 19 00:49:13 GMT 2024

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

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

Back to the top