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

Bug 360650

Summary: IncorrectObjectTypeException when listing packed tags
Product: [Technology] JGit Reporter: Tomasz Zarna <tomasz.zarna>
Component: JGitAssignee: Robin Rosenberg <robin.rosenberg>
Status: RESOLVED FIXED QA Contact:
Severity: major    
Priority: P3 CC: caniszczyk, john.arthorne, KetanPadegaonkar, remy.suen, robin.rosenberg
Version: 2.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
URL: http://egit.eclipse.org/r/4726
Whiteboard:
Bug Depends on:    
Bug Blocks: 360975, 369461    

Description Tomasz Zarna CLA 2011-10-12 07:24:13 EDT
Trying to list tags in an Orion repo[1] with ListTagCommand results in the following exception:

"org.eclipse.jgit.errors.IncorrectObjectTypeException: Object b39a1cc1bccaefb30fc1a128db207aec5b9dfa3e is not a tag."

The said object is a commit indeed, but in the packed-refs file there are 3 tags pointing to it too.

[1] http://git.eclipse.org/c/orion/org.eclipse.orion.server.git/, http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/
Comment 1 Tomasz Zarna CLA 2011-10-12 07:37:20 EDT
Comment 0 as a failing test case > http://egit.eclipse.org/r/4346.
Comment 2 Robin Rosenberg CLA 2011-10-18 21:59:24 EDT
The TagCommand and ListTagCommand assumes all tags are RevTags. This is wrong.

How devastating would breaking the API to correct the flaw be? We could return
either String or Ref.
Comment 3 Tomasz Zarna CLA 2011-10-19 05:23:05 EDT
(In reply to comment #2)
> We could return either String or Ref.

Fine with me, but I guess a single +1 from a non-committer is not enough.
Comment 4 Remy Suen CLA 2011-10-19 07:50:36 EDT
(In reply to comment #2)
> How devastating would breaking the API to correct the flaw be?

It would be very difficult to say. Should probably solicit community input through the forums and the mailing lists.
Comment 5 Tomasz Zarna CLA 2011-12-12 11:26:46 EST
For the record, this is being fixed by Robin under http://egit.eclipse.org/r/4726
Comment 6 Tomasz Zarna CLA 2012-03-08 07:47:35 EST
Ping. If it's going to be an API breakage, which I guess is fine for 2.0, I would release it sooner rather than later.
Comment 7 Tomasz Zarna CLA 2012-03-15 07:01:06 EDT
https://git.eclipse.org/r/#/c/4726 has been abandoned, does it mean this bug is a WONTFIX? I'm not sure what Robin had in mind saying "Moved to master".
Comment 8 Robin Rosenberg CLA 2012-03-31 08:13:01 EDT
(In reply to comment #7)
> https://git.eclipse.org/r/#/c/4726 has been abandoned, does it mean this bug is
> a WONTFIX? I'm not sure what Robin had in mind saying "Moved to master".

No. I meant that I re-posted the patch to be merged to master instead of stable-1.3. It's not merged yet, mainly because of a disagreemant on what
type to use, Ref or somehing else.
Comment 9 Robin Rosenberg CLA 2012-04-13 03:20:07 EDT
https://git.eclipse.org/r/#/c/5302/ is merged