]> source.dussan.org Git - jgit.git/commitdiff
Allow version builtin to run without git repository 12/1212/1
authorBenjamin Muskalla <bmuskalla@eclipsesource.com>
Mon, 2 Aug 2010 16:00:43 +0000 (18:00 +0200)
committerBenjamin Muskalla <bmuskalla@eclipsesource.com>
Mon, 2 Aug 2010 16:00:43 +0000 (18:00 +0200)
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>
org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Version.java

index 5bad4ef98c279ca12dde1eef12b60ccc2b79711e..9b51b871fcb785cb4e310afd0f8a80af5f3d2815 100644 (file)
@@ -55,4 +55,9 @@ class Version extends TextBuiltin {
 
                out.println(MessageFormat.format(CLIText.get().jgitVersion, pkg.getImplementationVersion()));
        }
+
+       @Override
+       protected final boolean requiresRepository() {
+               return false;
+       }
 }