Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 360650 - IncorrectObjectTypeException when listing packed tags
Summary: IncorrectObjectTypeException when listing packed tags
Status: RESOLVED FIXED
Alias: None
Product: JGit
Classification: Technology
Component: JGit (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows XP
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Robin Rosenberg CLA
QA Contact:
URL: http://egit.eclipse.org/r/4726
Whiteboard:
Keywords:
Depends on:
Blocks: 360975 369461
  Show dependency tree
 
Reported: 2011-10-12 07:24 EDT by Tomasz Zarna CLA
Modified: 2012-04-13 03:20 EDT (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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