Bug 423206

Summary: JGit describe should only consider non-annotated tags if --tags option is set (to behave like C Git)
Product: [Technology] JGit Reporter: Yun Zhou <yzhou>
Component: JGitAssignee: Project Inbox <jgit.core-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: matthias.sohn, me+eclipse, robin
Version: 3.2Keywords: bugday, helpwanted
Target Milestone: 5.0   
Hardware: All   
OS: All   
See Also: https://git.eclipse.org/r/115690
https://git.eclipse.org/r/117996
https://git.eclipse.org/r/124435
https://git.eclipse.org/c/jgit/jgit.git/commit/?id=5429d1a0cff593bf28186c38fde7e41798a2c0b8
Whiteboard:

Description Yun Zhou CLA 2013-12-04 12:41:42 EST
By default, git describe only shows annotated tags. Other tags are only considered if an argument like --tags or --all is passed to it. 

Jgit describe behaves like it always has --all passed to it. It considers every tag, and there doesn't seem to be a way to change this behavior short of modifying DescribeCommand. 

It would be nice to have the default behavior match cgit, or at the very least, available as an option so that DescribeCommand doesn't indiscriminately add both annotated and non-annotated tags to the tag hashmap.
Comment 1 Marcel Trautwein CLA 2017-07-10 19:15:59 EDT
WiP: https://github.com/childnode/jgit/compare/master...bug423206_describe_wo_leightweightTags

Any help on doing the official PR and cleanup but even some feedback is appreciated.

~Marcel
Comment 2 Matthias Sohn CLA 2017-07-11 02:52:22 EDT
We use Gerrit for code review. Hence please follow the contributor guide [1] and push your change to Gerrit for code review.

[1] https://wiki.eclipse.org/EGit/Contributor_Guide#Contributing_Patches
Comment 3 Eclipse Genie CLA 2018-01-19 07:12:07 EST
New Gerrit change created: https://git.eclipse.org/r/115690
Comment 4 Eclipse Genie CLA 2018-02-23 02:05:03 EST
New Gerrit change created: https://git.eclipse.org/r/117996
Comment 5 Eclipse Genie CLA 2018-06-12 19:03:50 EDT
New Gerrit change created: https://git.eclipse.org/r/124435
Comment 6 Eclipse Genie CLA 2018-06-13 03:52:15 EDT
Gerrit change https://git.eclipse.org/r/124435 was merged to [stable-5.0].
Commit: http://git.eclipse.org/c/jgit/jgit.git/commit/?id=5429d1a0cff593bf28186c38fde7e41798a2c0b8