diff options
author | Matthias Sohn <matthias.sohn@sap.com> | 2022-02-20 12:03:22 +0100 |
---|---|---|
committer | Matthias Sohn <matthias.sohn@sap.com> | 2022-03-02 09:56:03 +0100 |
commit | a2d5650b8fc6775cc8684550d205502c70ab8771 (patch) | |
tree | 67fb59a1befdc64e0ce00952c2d6968fa07d2e37 /org.eclipse.jgit.test/tst/org/eclipse/jgit/api | |
parent | 00bb7cc9a5bb1627c3ef8f2e4a5886e79afba189 (diff) | |
download | jgit-a2d5650b8fc6775cc8684550d205502c70ab8771.tar.gz jgit-a2d5650b8fc6775cc8684550d205502c70ab8771.zip |
DescribeCommand: Add support for --abbrev=0
Setting --abbrev=0 suppresses long format and only shows the closest tag
[1].
[1] https://git-scm.com/docs/git-describe#Documentation/git-describe.txt---abbrevltngt
Change-Id: Ifcf4d7786dd0f0fb0315d8093fdb54384ed9d5f9
Diffstat (limited to 'org.eclipse.jgit.test/tst/org/eclipse/jgit/api')
-rw-r--r-- | org.eclipse.jgit.test/tst/org/eclipse/jgit/api/DescribeCommandTest.java | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/DescribeCommandTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/DescribeCommandTest.java index 2051169996..48980ad6e4 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/DescribeCommandTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/DescribeCommandTest.java @@ -102,6 +102,8 @@ public class DescribeCommandTest extends RepositoryTestCase { assertEquals("alice-t1-2-g3e563c5", describe(c4, "alice*")); assertEquals("bob-t2-1-g3e563c5", describe(c4, "bob*")); assertEquals("bob-t2-1-g3e563c5", describe(c4, "a*", "b*", "c*")); + + assertEquals("bob-t2", describe(c4, false, true, 0)); } else { assertEquals(null, describe(c2)); assertEquals(null, describe(c3)); |