Skip to content

Commit c2daf53

Browse files
author
Thomas Wolf
committed
Prevent NoWorkTreeException in GitProjectData
Don't try to get the working directory of a bare repository. Bug: 517056 Change-Id: I1f84142e1ea2aae1c2ae7ef062d7201afa382a2f Signed-off-by: Thomas Wolf <[email protected]>
1 parent c8b3b8f commit c2daf53

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

org.eclipse.egit.core/src/org/eclipse/egit/core/project/GitProjectData.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ public boolean visit(IResourceDelta delta)
338338
try {
339339
Repository r = Activator.getDefault()
340340
.getRepositoryCache().lookupRepository(git);
341-
if (m != null && r != null
341+
if (m != null && r != null && !r.isBare()
342342
&& gitCandidate.equals(r.getWorkTree())) {
343343
if (data.map(m)) {
344344
data.mappings.put(m.getContainerPath(), m);

0 commit comments

Comments
 (0)