Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 341007

Summary: Reset fails with checkout conflict
Product: [Technology] EGit Reporter: Jan Ploski <jpljpl>
Component: CoreAssignee: Christian Halstrick <christian.halstrick>
Status: RESOLVED WORKSFORME QA Contact:
Severity: normal    
Priority: P3 CC: christian.halstrick, jens.baumgart, matthias.sohn
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
See Also: https://github.com/eclipse/jgit/pull/43
Whiteboard:

Description Jan Ploski CLA 2011-03-25 17:23:27 EDT
Build Identifier: M20110210-1200

In one of my repositories (of zfs-fuse) git reset --hard on the command line works without problems. However, an attempt to do the same with EGit (even *after* the command-line reset) leads to an exception. I don't think this is a duplicate of 335567 because a fix for that bug is probably already included in the version I'm reporting against (0.11.3). The file and directory src/lib/libsolkerncompat/i386 mentioned in the exception do not exist in the working directory, which explains the inability to delete, but why is it trying to delete a non-existing file?

org.eclipse.jgit.errors.CheckoutConflictException: Checkout conflict with file: Cannot delete file: src/lib/libsolkerncompat/i386/atomic.o
at org.eclipse.jgit.dircache.DirCacheCheckout.cleanUpConflicts(DirCacheCheckout.java:802)
at org.eclipse.jgit.dircache.DirCacheCheckout.checkout(DirCacheCheckout.java:394)
at org.eclipse.egit.core.op.ResetOperation.checkoutIndex(ResetOperation.java:236)
at org.eclipse.egit.core.op.ResetOperation.reset(ResetOperation.java:136)
at org.eclipse.egit.core.op.ResetOperation.access$0(ResetOperation.java:115)
at org.eclipse.egit.core.op.ResetOperation$1.run(ResetOperation.java:105)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1975)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1957)
at org.eclipse.egit.core.op.ResetOperation.execute(ResetOperation.java:109)
at org.eclipse.egit.ui.internal.job.JobUtil$1.run(JobUtil.java:50)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)


Reproducible: Always

Steps to Reproduce:
I haven't attempted to reproduce it outside of my working environment.
Comment 1 Christian Halstrick CLA 2011-10-12 04:53:52 EDT
I tried to reproduce this by doing the following:
- cloned with egit (1.2.0.201109260137) repo http://git.zfs-fuse.net/official and let the import wizzard create a general project for this
- added a line to doc/Makefile, saved it (didn't add the file to index)
- with egit did a Reset(hard) on origin/master (commit 3b32fa7133e8f6c88c936adcf351e8a435a563ec)

This worked fine. So I am having trouble to reproduce this problem. Does what I explain work for you? Could it be that you had previously a conflict on that file. The stacktrace leads to code which cleans up conflicting pathes.
Comment 2 Matthias Sohn CLA 2012-07-09 03:20:09 EDT
closing since this seems to be not reproducable and we didn't get a response from the author since more than a year
Comment 3 Eclipse Genie CLA 2017-03-10 08:22:28 EST
GitHub Pull Request 43 created by [onhate]
https://github.com/eclipse/jgit/pull/43