Skip to content
This repository has been archived by the owner on Oct 5, 2018. It is now read-only.

describe() works different from git describe #260

Closed
childnode opened this issue Jul 6, 2017 · 5 comments
Closed

describe() works different from git describe #260

childnode opened this issue Jul 6, 2017 · 5 comments

Comments

@childnode
Copy link

While git describe uses annotated tags only per default, Grgit.describe() behaves like git describe --tags

Would be great default would behave the same way and --tags to resolve leightweight tags would be an option.

Another case is the git describe --dirty case which seems to be impossible to get with grgit too atm?!

@ajoberstar
Copy link
Owner

gradle-git, relies on grgit, which in turn relies on JGit. JGit's DescribeCommand currently doesn't seem to provide any configurability to address this, so until that's enhanced you'll have to find an alternate solution.

Since this is a grgit issue rather than gradle-git, I'll close this out. If there is an issue open (or you open a new one) with JGit that you want to tie this request to, please open a new issue on the grgit repo so it can be tracked.

@childnode
Copy link
Author

childnode commented Jul 10, 2017

indeed, the relevant issue is here: https://bugs.eclipse.org/bugs/show_bug.cgi?id=423206
thanks anyway for pointing out (even it was obvious ;) )

But, since this bug is from 2013 and unchanged... perhaps it would be a good point to fork JGit and patch it myself ... -let's see- omgFYI: seems not that impossible but now I'm tired of the eclipse community thingy ;D

childnode added a commit to childnode/jgit that referenced this issue Jul 10, 2017
… --tags option is set (to behave like C Git)

https://bugs.eclipse.org/bugs/show_bug.cgi?id=423206
ajoberstar/gradle-git#260

First draft ... disable non-annotated tags .. indeed, test will fail now ;)
childnode added a commit to childnode/jgit that referenced this issue Jul 10, 2017
… --tags option is set (to behave like C Git)

https://bugs.eclipse.org/bugs/show_bug.cgi?id=423206
ajoberstar/gradle-git#260

now, I found the code in NameRevCommand for looking for annotated tags, it's "easy"
but still: tests are missing / failing and should be updated to the new combinations

++++
git.describe().setAllTags(true) has to be set to behave like before, else the default is now as in c git
@childnode
Copy link
Author

FYI: pending change in jgit https://git.eclipse.org/r/115690

@childnode
Copy link
Author

@ajoberstar
FYI: change is approved and upcoming in jgit 5.0

@ajoberstar
Copy link
Owner

Thanks for the update. This should get resolved with ajoberstar/grgit#233.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants