Re: [JGIT PATCH 1/1] jgit: create a tag command

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Mike Ralphson
Date: Thursday, July 10, 2008 - 8:31 am

2008/7/7 Robin Rosenberg <robin.rosenberg.lists@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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[JGIT PATCH 1/1] jgit: create a tag command, Robin Rosenberg, (Sun Jul 6, 3:41 pm)
Re: [JGIT PATCH 1/1] jgit: create a tag command, Robin Rosenberg, (Sun Jul 6, 4:16 pm)
Re: [JGIT PATCH 1/1] jgit: create a tag command, Mike Ralphson, (Thu Jul 10, 8:31 am)
Re: [JGIT PATCH 1/1] jgit: create a tag command, Robin Rosenberg, (Thu Jul 10, 11:02 am)
Re: [JGIT PATCH 1/1] jgit: create a tag command, Shawn O. Pearce, (Thu Jul 10, 7:05 pm)
Re: [JGIT PATCH 1/1] jgit: create a tag command, Robin Rosenberg, (Fri Jul 11, 1:28 am)
Re: [JGIT PATCH 1/1] jgit: create a tag command, Mike Ralphson, (Fri Jul 11, 1:45 am)
Re: [JGIT PATCH 1/1] jgit: create a tag command, Shawn O. Pearce, (Fri Jul 11, 8:01 pm)
Re: [JGIT PATCH 1/1] jgit: create a tag command, Shawn O. Pearce, (Fri Jul 11, 8:42 pm)
Re: [JGIT PATCH 1/1] jgit: create a tag command, Robin Rosenberg, (Thu Jul 17, 2:31 pm)
Re: [JGIT PATCH 1/1] jgit: create a tag command, Shawn O. Pearce, (Thu Jul 17, 2:45 pm)
Re: [JGIT PATCH 1/1] jgit: create a tag command, Robin Rosenberg, (Thu Jul 17, 3:24 pm)