From 43876f77917ab1926aa86419a6961b9d88241b79 Mon Sep 17 00:00:00 2001 From: Praveen Innamuri Date: Wed, 4 Jun 2014 15:48:16 -0700 Subject: [PATCH] TISTUD-6376 Appcelerator Studio 3.3.0.201405211748 is very slow --- .../com/aptana/git/core/model/GitIndex.java | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/plugins/com.aptana.git.core/src/com/aptana/git/core/model/GitIndex.java b/plugins/com.aptana.git.core/src/com/aptana/git/core/model/GitIndex.java index c4e6ee17ee..4d1fe8a79b 100644 --- a/plugins/com.aptana.git.core/src/com/aptana/git/core/model/GitIndex.java +++ b/plugins/com.aptana.git.core/src/com/aptana/git/core/model/GitIndex.java @@ -37,6 +37,7 @@ import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.MultiStatus; import org.eclipse.core.runtime.NullProgressMonitor; +import org.eclipse.core.runtime.Path; import org.eclipse.core.runtime.Platform; import org.eclipse.core.runtime.Status; import org.eclipse.core.runtime.SubMonitor; @@ -788,7 +789,7 @@ public void refreshAsync(final Collection paths) } } - private abstract static class FilesRefreshJob implements Callable + private abstract class FilesRefreshJob implements Callable { protected GitRepository repo; @@ -937,6 +938,16 @@ else if (!tracked && file.status == ChangedFile.Status.NEW) { List fileStatus = dictionary.get(path); + if (Path.fromPortableString(path).isAbsolute()) + { + IdeLog.logWarning( + GitPlugin.getDefault(), + MessageFormat + .format("Found an entry for an absolute path ({0}), won't add to our changed file listing for repo at {1}", + path, workingDirectory().toOSString())); + continue; + } + ChangedFile.Status status = ChangedFile.Status.MODIFIED; if (fileStatus.get(4).equals(DELETED_STATUS)) { @@ -974,7 +985,7 @@ else if (fileStatus.get(0).equals(":000000")) //$NON-NLS-1$ } - private static final class StagedFilesRefreshJob extends FilesRefreshJob + private final class StagedFilesRefreshJob extends FilesRefreshJob { private StagedFilesRefreshJob(GitIndex index, Set filePaths) { @@ -1008,7 +1019,7 @@ private void readStagedFiles(String string) } } - private static final class UnstagedFilesRefreshJob extends FilesRefreshJob + private final class UnstagedFilesRefreshJob extends FilesRefreshJob { private UnstagedFilesRefreshJob(GitIndex index, Set filePaths) { @@ -1041,7 +1052,7 @@ private void readUnstagedFiles(String string) } } - private static final class UntrackedFilesRefreshJob extends FilesRefreshJob + private final class UntrackedFilesRefreshJob extends FilesRefreshJob { private UntrackedFilesRefreshJob(GitIndex index, Set filePaths)