Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 336291 - Cannot merge using tag
Summary: Cannot merge using tag
Status: RESOLVED FIXED
Alias: None
Product: EGit
Classification: Technology
Component: Core (show other bugs)
Version: 0.11   Edit
Hardware: All All
: P3 normal with 1 vote (vote)
Target Milestone: 3.0   Edit
Assignee: Christian Halstrick CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-03 17:12 EST by Bernard Leach CLA
Modified: 2013-05-11 17:47 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bernard Leach CLA 2011-02-03 17:12:32 EST
In the 'Git repositories' view I have attempted to merge using a tag which has failed;

Exception caught during execution of merge command. org.eclipse.jgit.errors.IncorrectObjectTypeException: Object e9ae7cc44f957e53f8af7fae4f14779f735e65e4 is not a commit.

When I 'git show e9ae7cc' I see that the object is the tag object and not the commit.

However if I select a different tag from the same view I don't see the error but if I 'git show `git rev-tag tag`' the object looks the same.

I'm using nightly build; 201102031130
Comment 1 Bernard Leach CLA 2011-02-08 00:17:12 EST
Still occurs on 0.11.0.201102071909.


org.eclipse.jgit.api.errors.JGitInternalException: Exception caught during execution of merge command. org.eclipse.jgit.errors.IncorrectObjectTypeException: Object e9ae7cc44f957e53f8af7fae4f14779f735e65e4 is not a commit.
        at org.eclipse.jgit.api.MergeCommand.call(MergeCommand.java:243)
        at org.eclipse.egit.core.op.MergeOperation$1.run(MergeOperation.java:108)
        at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1800)
        at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1782)
        at org.eclipse.egit.core.op.MergeOperation.execute(MergeOperation.java:128)
        at org.eclipse.egit.ui.internal.actions.MergeActionHandler$1.run(MergeActionHandler.java:63)
        at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Caused by: org.eclipse.jgit.errors.IncorrectObjectTypeException: Object e9ae7cc44f957e53f8af7fae4f14779f735e65e4 is not a commit.
        at org.eclipse.jgit.storage.file.WindowCursor.open(WindowCursor.java:117)
        at org.eclipse.jgit.revwalk.RevWalk.getCachedBytes(RevWalk.java:855)
        at org.eclipse.jgit.revwalk.RevCommit.parseHeaders(RevCommit.java:136)
        at org.eclipse.jgit.revwalk.RevWalk.markStart(RevWalk.java:282)
        at org.eclipse.jgit.revwalk.RevWalk.isMergedInto(RevWalk.java:396)
        at org.eclipse.jgit.api.MergeCommand.call(MergeCommand.java:170)
        ... 6 more


A 'git show a9ae' prints;

tag MY_GREAT_RELEASE
Tagger: Bernard Leach
Date:   Wed Feb 2 13:48:08 2011 +1100


The super duper release release
commit b0c8acff214c07e98139a494cb715ec886db88e6
Author: Bernard Leach
Date:   Wed Feb 2 13:48:07 2011 +1100

    Solved the last bug for the release

diff --git a/foo/thefile b/foo/thefile
new file mode 100644
index 0000000..0d5e1e5
--- /dev/null
+++ b/foo/thefile
[...]
Comment 2 Stefan Lay CLA 2013-05-10 10:23:33 EDT
Patch proposed at https://git.eclipse.org/r/#/c/12701/
Comment 3 Matthias Sohn CLA 2013-05-11 17:47:24 EDT
merged as c93a59330249677cd990820b59558a39f747009f