Bug 537883 - Support for git describe abbrev length
Summary: Support for git describe abbrev length
Status: RESOLVED FIXED
Alias: None
Product: JGit
Classification: Technology
Component: JGit (show other bugs)
Version: 5.0.2   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: 6.1   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-08-13 02:40 EDT by Martin Mosegaard CLA
Modified: 2022-02-19 18:07 EST (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 Martin Mosegaard CLA 2018-08-13 02:40:58 EDT
Since Git 2.11, the default abbreviation length is no longer always 7 digits. This means that the output of a plain git describe may vary. To get consistent behavior, we can use `git describe --abbrev=N`. But that does not seem to be supported by the [DescribeCommand](http://download.eclipse.org/jgit/site/5.0.2.201807311906-r/apidocs/org/eclipse/jgit/api/DescribeCommand.html)

For background on the Git change, see:

- https://github.com/git/git/blob/aeddbfdfa48443c034a9b28b10dfddf2f71b907f/Documentation/RelNotes/2.11.0.txt
- https://public-inbox.org/git/87a7q3tze3.fsf@evledraar.gmail.com/T/

This is related to https://github.com/ajoberstar/grgit/issues/254
Comment 1 Matthias Sohn CLA 2018-08-16 08:45:48 EDT
maybe you want to help and contribute an implementation ?
Comment 2 Eclipse Genie CLA 2022-01-06 03:07:34 EST
New Gerrit change created: https://git.eclipse.org/r/c/jgit/jgit/+/189338
Comment 3 Sebastian Schuberth CLA 2022-01-06 03:09:50 EST
I went around adding this. I'd appreciate reviews :-)