Re: [JGIT PATCH 1/1] jgit: create a tag command
2008/7/7 Robin Rosenberg <robin.rosenberg.lists@dewire.com>:
Show 5 quoted lines
>
> This command allows us to create simple or annotated tags.
> PGP signed tags are not yet supported.
>
> Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
Apologies this will be whitespace damaged, but it's trivial.
diff --git a/org.spearce.jgit/src/org/spearce/jgit/pgm/Tag.java
b/org.spearce.jgit/src/org/spearce/jgit/pgm/Tag.java
index 110db6b..a215fbd 100644
--- a/org.spearce.jgit/src/org/spearce/jgit/pgm/Tag.java
+++ b/org.spearce.jgit/src/org/spearce/jgit/pgm/Tag.java
@@ -47,6 +47,8 @@ class Tag extends TextBuiltin {
String message = null;
String ref = "HEAD";
boolean force = false;
+ if (args.length == 0)
+ usage();
for (int i = 0; i < args.length; ++i) {
if (args[i].equals("-f")) {
force = true;
@@ -97,6 +99,6 @@ class Tag extends TextBuiltin {
}
private void usage() {
- throw die("Usage: -m message tag [head]");
+ throw die("Usage: [-m message] [-f] tag [head]");
}
}
Signed-off-by: Mike Ralphson <mike@abacus.co.uk>
Loving the make_jgit stuff.
Mike