Erik Verboom
Erik Verboom

Reputation: 395

Egit error when saving file

Since i have upgraded to eclipse mars (4.5) egit is throwing regex PatternSyntaxException exceptions on every file save, on every project build/clean and on some other occasions. Afterwards, the files don't appear in the unstaged changes list, basically rendering egit useless for this project.

This is the error log entry:

!ENTRY org.eclipse.core.jobs 4 2 2015-07-01 10:27:42.183
!MESSAGE An internal error occurred during: "Computing Git status for repository I-Sail".
!STACK 0
java.util.regex.PatternSyntaxException: Illegal repetition
{\rtf1\ansi\ansicpg1252\cocoartf1265\cocoasubrtf200
at java.util.regex.Pattern.error(Pattern.java:1924)
at java.util.regex.Pattern.closure(Pattern.java:3104)
at java.util.regex.Pattern.sequence(Pattern.java:2101)
at java.util.regex.Pattern.expr(Pattern.java:1964)
at java.util.regex.Pattern.compile(Pattern.java:1665)
at java.util.regex.Pattern.<init>(Pattern.java:1337)
at java.util.regex.Pattern.compile(Pattern.java:1022)
at org.eclipse.jgit.ignore.internal.Strings.convertGlob(Strings.java:352)
at org.eclipse.jgit.ignore.internal.WildCardMatcher.<init>(WildCardMatcher.java:66)
at org.eclipse.jgit.ignore.internal.PathMatcher.createNameMatcher0(PathMatcher.java:145)
at org.eclipse.jgit.ignore.internal.PathMatcher.createPathMatcher(PathMatcher.java:127)
at org.eclipse.jgit.ignore.FastIgnoreRule.<init>(FastIgnoreRule.java:112)
at org.eclipse.jgit.ignore.IgnoreNode.parse(IgnoreNode.java:114)
at org.eclipse.jgit.treewalk.WorkingTreeIterator$PerDirectoryIgnoreNode.load(WorkingTreeIterator.java:1215)
at org.eclipse.jgit.treewalk.WorkingTreeIterator$RootIgnoreNode.load(WorkingTreeIterator.java:1236)
at org.eclipse.jgit.treewalk.WorkingTreeIterator.getIgnoreNode(WorkingTreeIterator.java:648)
at org.eclipse.jgit.treewalk.WorkingTreeIterator.isEntryIgnored(WorkingTreeIterator.java:616)
at org.eclipse.jgit.treewalk.WorkingTreeIterator.isEntryIgnored(WorkingTreeIterator.java:599)
at org.eclipse.jgit.treewalk.WorkingTreeIterator.isEntryIgnored(WorkingTreeIterator.java:586)
at org.eclipse.jgit.treewalk.filter.IndexDiffFilter.include(IndexDiffFilter.java:190)
at org.eclipse.jgit.treewalk.filter.AndTreeFilter$List.include(AndTreeFilter.java:163)
at org.eclipse.jgit.treewalk.TreeWalk.next(TreeWalk.java:572)
at org.eclipse.jgit.lib.IndexDiff.diff(IndexDiff.java:434)
at org.eclipse.egit.core.internal.indexdiff.IndexDiffCacheEntry.calcIndexDiffDataFull(IndexDiffCacheEntry.java:534)
at org.eclipse.egit.core.internal.indexdiff.IndexDiffCacheEntry.access$6(IndexDiffCacheEntry.java:523)
at org.eclipse.egit.core.internal.indexdiff.IndexDiffCacheEntry$4.run(IndexDiffCacheEntry.java:290)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

The problem seems to occur only on android projects. Other java projects, as well as symfony/php websites work fine. It occurs independent of whether i create a new git repository for the project, or use my old one that used to work fine before the update. I tried reinstalling the egit plugin, without result. When i use git in command line on the same repository, everything is fine.

From the error message i would say that somewhere a file is saved in rtf format that egit expects to be in plain txt. However, i have no idea which file this could be or how to find it.

Upvotes: 2

Views: 325

Answers (1)

soru
soru

Reputation: 5526

Just from looking at the stack trace, it seems likely the problem is in a .gitignore file somewhere; that's supposed to contain regexps, and { is regexp repetition syntax.

That might be in the repository, or more likely in some place egit finds it and plain git doesn't, e.g. whatever your systems interpretation of $HOME is.

See: https://help.github.com/articles/ignoring-files/#create-a-global-gitignore

Upvotes: 3

Related Questions