Controlling eGit's treatment of symbolic links

可紊 提交于 2019-12-04 04:25:36

Our problem was discussed in this: Eclipse Community Forums Thread

It looks like currently the Linux native lstat support is not too easy to make portable. The Least Common Denominator paradigm that they have for programming Eclipse in Java make it harder to do Linux or Mac native stuff. (read: *cough* Windows doesn't support symlinks *cough*).

The good news is:

It seems possible, but they'd need to code it in a way that complies to their 'Write Once Test Everywhere' programming standards. I feel that it's important to have some native stat and lstat support on Linux when using EGit because of this problem, as well as Eclipse bug #346079.

Simply having EGit installed causes slowdowns & IDE freezes when doing a Git Refresh :-(

The bad news is:

These two bugs are stopping me from using EGit for the majority of my git commands. The user experience makes EGit unusable for me. It would be really nice to be able to use EGit within Eclipse so that Mylyn User Stories & Tasks could be tied to feature branches automatically. It would also be great to have the automatic commit message template features. This would make putting the current task & status in the commit message a breeze.

This is bugging me almost enough that I'm ready to see if it's possible to make some scripts to query Eclipse / Mylyn for the current commit message template output, and do the git commit from the commandline using this. I'm not sure how automatic per-user-story feature branch creation would work though.

Until these problems get fixed, I'm sure a lot of EGit users will not be happy :-(

We suffered from this problem cluttering up the commit screen no end, and occasionally causing someone to forget to include a file they had created.

The solution we came up with was to manually edit the .gitignore files to include the paths where the linked files would appear when the symlinks were dereferenced:

/ProjectHomeFolder/.gitignore

Since we were working in the Play Framework we also edited the following ignores: /ProjectHomeFolder/conf/.gitignore
/ProjectHomeFolder/public/.gitignore

We simply added /ModuleName for each of the modules that were symlinked and now egit ignores them properly, for completeness here is the full contents of my root .gitignore file, that sits in the root directory of the project:

/.project
/.classpath
/.gitignore
/eclipse
/tmp
/crud
/.git
/.settings
/modules
/conf
/betterlogs-1.0
/chronostamp-0.1
/logisimayml-1.5
/betterlogs-1.0
/sass-1.1
/deadbolt-1.4.2
/jquery-1.0
/log4play-0.5
/messages-1.1.1
/navigation-0.1
/jqueryui-1.0
/scaffold-0.1
/table-1.2
/tabularasa-0.2

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!