diff options
author | Jason Yeo <jasonyeo88@gmail.com> | 2020-10-05 13:07:22 +0800 |
---|---|---|
committer | Jason Yeo <jasonyeo88@gmail.com> | 2020-10-13 18:06:39 +0800 |
commit | 276fcb2a11aafbec488ac57de7c01ab7932762d9 (patch) | |
tree | 1ab5a8776fb543a6c6d8678bca11085e45de2e75 /org.eclipse.jgit.pgm | |
parent | 8887a6779aea69e0871d8d846910d324f89898bd (diff) | |
download | jgit-276fcb2a11aafbec488ac57de7c01ab7932762d9.tar.gz jgit-276fcb2a11aafbec488ac57de7c01ab7932762d9.zip |
Implement git describe --all
This enables jgit to use any refs in the refs/ namespace when describing
commits.
Signed-off-by: Jason Yeo <jasonyeo88@gmail.com>
Change-Id: I1fa22d1c39c0e2f5e4c2938c9751d8556494ac26
Diffstat (limited to 'org.eclipse.jgit.pgm')
-rw-r--r-- | org.eclipse.jgit.pgm/resources/org/eclipse/jgit/pgm/internal/CLIText.properties | 1 | ||||
-rw-r--r-- | org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Describe.java | 4 |
2 files changed, 5 insertions, 0 deletions
diff --git a/org.eclipse.jgit.pgm/resources/org/eclipse/jgit/pgm/internal/CLIText.properties b/org.eclipse.jgit.pgm/resources/org/eclipse/jgit/pgm/internal/CLIText.properties index f3e1fe31ba..c116437c64 100644 --- a/org.eclipse.jgit.pgm/resources/org/eclipse/jgit/pgm/internal/CLIText.properties +++ b/org.eclipse.jgit.pgm/resources/org/eclipse/jgit/pgm/internal/CLIText.properties @@ -294,6 +294,7 @@ usage_Status=Show the working tree status usage_StopTrackingAFile=Stop tracking a file usage_TextHashFunctions=Scan repository to compute maximum number of collisions for hash functions usage_UpdateRemoteRepositoryFromLocalRefs=Update remote repository from local refs +usage_UseAll=Use all refs found in refs/ usage_UseTags=Use any tag including lightweight tags usage_WriteDirCache=Write the DirCache usage_abbrevCommits=abbreviate commits to N + 1 digits diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Describe.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Describe.java index 610b6472a5..8aa119a358 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Describe.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Describe.java @@ -32,6 +32,9 @@ class Describe extends TextBuiltin { @Option(name = "--long", usage = "usage_LongFormat") private boolean longDesc; + @Option(name = "--all", usage = "usage_UseTags") + private boolean useAll; + @Option(name = "--tags", usage = "usage_UseTags") private boolean useTags; @@ -50,6 +53,7 @@ class Describe extends TextBuiltin { cmd.setTarget(tree); } cmd.setLong(longDesc); + cmd.setAll(useAll); cmd.setTags(useTags); cmd.setAlways(always); cmd.setMatch(patterns.toArray(new String[0])); |