Bug 423206 - JGit describe should only consider non-annotated tags if --tags option is set (to behave like C Git)
Summary: JGit describe should only consider non-annotated tags if --tags option is set...
Status: RESOLVED FIXED
Alias: None
Product: JGit
Classification: Technology
Component: JGit (show other bugs)
Version: 3.2   Edit
Hardware: All All
: P3 normal with 1 vote (vote)
Target Milestone: 5.0   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: bugday, helpwanted
Depends on:
Blocks:
 
Reported: 2013-12-04 12:41 EST by Yun Zhou CLA
Modified: 2018-06-13 04:03 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 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