Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 357039 - EGit does not handle .gitattributes ident
Summary: EGit does not handle .gitattributes ident
Status: NEW
Alias: None
Product: EGit
Classification: Technology
Component: Core (show other bugs)
Version: 1.0   Edit
Hardware: All All
: P3 major with 8 votes (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 342372
Blocks:
  Show dependency tree
 
Reported: 2011-09-08 03:11 EDT by Thomas Mortagne CLA
Modified: 2015-07-02 05:08 EDT (History)
7 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Mortagne CLA 2011-09-08 03:11:03 EDT
In Git it's possible to define an automatically generated id generally placed in the class javadoc in Java. It's inserted when doing the pull/merge/whatever change the java file and skipped when committing.

Problem is that EGit does not follow this rule at all and list and try to commit a lots of files in which my real modification are pretty hard to find.

Actually I'm not even sure EGit  supports .gitattributes at all since eol=lf does not seems to be handled properly either.

Was not sure If I should create this bug on Egit or JGit since there is probably a bit of both I guess.
Comment 1 Matthias Sohn CLA 2011-09-13 11:25:49 EDT
(In reply to comment #0)
> In Git it's possible to define an automatically generated id generally placed
> in the class javadoc in Java. It's inserted when doing the pull/merge/whatever
> change the java file and skipped when committing.

I do not understand this sentence. Could you try to rephrase it or give an example.

> Problem is that EGit does not follow this rule at all and list and try to
> commit a lots of files in which my real modification are pretty hard to find.
> 
> Actually I'm not even sure EGit  supports .gitattributes at all since eol=lf
> does not seems to be handled properly either.

JGit doesn't yet support git attributes, see bug 342372.
Also support for core.autocrlf is still missing, see bug 301775.

I do not yet get what's the problem you want to solve. Maybe you could provide steps which show your problem on a small example.
Comment 2 Thomas Mortagne CLA 2011-09-13 11:48:38 EDT
(In reply to comment #1)
> (In reply to comment #0)
> > In Git it's possible to define an automatically generated id generally placed
> > in the class javadoc in Java. It's inserted when doing the pull/merge/whatever
> > change the java file and skipped when committing.
> 
> I do not understand this sentence. Could you try to rephrase it or give an
> example.

I just described what "ident" git attribute does.

To see an example you can clone git://github.com/xwiki/xwiki-commons.git and open any java file like xwiki-commons-core/xwiki-commons-component/xwiki-commons-component-api/src/main/java/org/xwiki/component/manager/ComponentManager.java you will find something like

@version $Id: 942c6d2f6127bb21089951204c89d8eddd76daa1 $

which does not exist in https://github.com/xwiki/xwiki-commons/blob/master/xwiki-commons-core/xwiki-commons-component/xwiki-commons-component-api/src/main/java/org/xwiki/component/manager/ComponentManager.java

If you import this project with M2Eclipse and share it you will see that EGit find a modification on every java file which is this id that git added while cloning (it's the same for any other git command which touch a java file like pull/checkout/etc.). The issue is that it's then a pain to know what you really modified.

The .gitattribute file for this example is on https://github.com/xwiki/xwiki-commons/blob/master/.gitattributes

Note that you can remove all $Id using the reset HARD in of EGit UI but it comes back every time you use git shell command basically.

> 
> > Problem is that EGit does not follow this rule at all and list and try to
> > commit a lots of files in which my real modification are pretty hard to find.
> > 
> > Actually I'm not even sure EGit  supports .gitattributes at all since eol=lf
> > does not seems to be handled properly either.
> 
> JGit doesn't yet support git attributes, see bug 342372.
> Also support for core.autocrlf is still missing, see bug 301775.
> 
> I do not yet get what's the problem you want to solve. Maybe you could provide
> steps which show your problem on a small example.
Comment 3 Matthias Sohn CLA 2011-10-09 17:45:05 EDT
JGit doesn't support git attributes yet, see bug 342372, hence EGit doesn't support them either.