summaryrefslogtreecommitdiffstatsabout
diff options
context:
space:
mode:
authorBenjamin Muskalla2010-08-02 12:00:43 (EDT)
committer Benjamin Muskalla2010-08-02 12:00:43 (EDT)
commitd08be7aceb18296e9a3465787d3d09da0479eabd (patch)
tree11aae48fd083fc46b6cdd297778ffcf65c7f3802
parent94207f0a43a44261b8170d3cdba3028059775d9d (diff)
downloadjgit-d08be7aceb18296e9a3465787d3d09da0479eabd.zip
jgit-d08be7aceb18296e9a3465787d3d09da0479eabd.tar.gz
jgit-d08be7aceb18296e9a3465787d3d09da0479eabd.tar.bz2
Allow version builtin to run without git repositoryrefs/changes/12/1212/1
The version builtin should be able to run without a git directory to call it from wherever you want. Change-Id: I1a3bce662e6788b860a275ee50315af8d5cc094a Signed-off-by: Benjamin Muskalla <bmuskalla@eclipsesource.com>
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Version.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Version.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Version.java
index 5bad4ef..9b51b87 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Version.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Version.java
@@ -55,4 +55,9 @@ class Version extends TextBuiltin {
out.println(MessageFormat.format(CLIText.get().jgitVersion, pkg.getImplementationVersion()));
}
+
+ @Override
+ protected final boolean requiresRepository() {
+ return false;
+ }
}