git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Mike Ralphson <mike.ralphson@gmail.com>
Date
Jul 10, 2008, 15:31 UTC
Message-ID
<e2b179460807100831g5d62a0a8nc7e7bf2715f0b9f1@mail.gmail.com>
In-Reply-To
<200807070116.39892.robin.rosenberg.lists@dewire.com>
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
Previous: Robin RosenbergNext: Robin Rosenberg
Message 3 of 13 in “jgit: create a tag command”
  1. 1/1 jgit: create a tag commandRobin Rosenberg, Jul 6, 2008
  2. Robin RosenbergJul 6, 2008
  3. Mike RalphsonJul 10, 2008
  4. Robin RosenbergJul 10, 2008
  5. Differences between git-applu and GNU patch (was: [JGIT PATCH 1/1] jgit: create a tag command)Jakub Narebski, Jul 11, 2008
  6. Shawn O. PearceJul 11, 2008
  7. Robin RosenbergJul 11, 2008
  8. Mike RalphsonJul 11, 2008
  9. Shawn O. PearceJul 12, 2008
  10. Shawn O. PearceJul 12, 2008
  11. Robin RosenbergJul 17, 2008
  12. Shawn O. PearceJul 17, 2008
  13. Robin RosenbergJul 17, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.