From: Robin Rosenberg <robin.rosenberg@dewire.com>
To: spearce@spearce.org
Cc: git@vger.kernel.org, Robin Rosenberg <robin.rosenberg@dewire.com>
Subject: [PATCH] Write refs when creating tags
Date: Mon, 14 May 2007 01:39:15 +0200 [thread overview]
Message-ID: <11790995573817-git-send-email-robin.rosenberg@dewire.com> (raw)
In-Reply-To: <11790995571082-git-send-email-robin.rosenberg@dewire.com>
Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
---
org.spearce.jgit/src/org/spearce/jgit/lib/Tag.java | 4 ++--
.../tst/org/spearce/jgit/lib/T0003_Basic.java | 6 +++---
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/org.spearce.jgit/src/org/spearce/jgit/lib/Tag.java b/org.spearce.jgit/src/org/spearce/jgit/lib/Tag.java
index d5c6b54..d2a1b2b 100644
--- a/org.spearce.jgit/src/org/spearce/jgit/lib/Tag.java
+++ b/org.spearce.jgit/src/org/spearce/jgit/lib/Tag.java
@@ -128,9 +128,9 @@ public class Tag {
if (tagger!=null || message!=null || type!=null) {
ObjectId tagid = new ObjectWriter(objdb).writeTag(this);
setTagId(tagid);
- objdb.writeRef("refs/heads/"+getTag(),tagid);
+ objdb.writeRef("refs/tags/"+getTag(),tagid);
} else {
- objdb.writeRef("refs/heads/"+getTag(),objId);
+ objdb.writeRef("refs/tags/"+getTag(),objId);
}
}
diff --git a/org.spearce.jgit/tst/org/spearce/jgit/lib/T0003_Basic.java b/org.spearce.jgit/tst/org/spearce/jgit/lib/T0003_Basic.java
index 115e391..2f76907 100644
--- a/org.spearce.jgit/tst/org/spearce/jgit/lib/T0003_Basic.java
+++ b/org.spearce.jgit/tst/org/spearce/jgit/lib/T0003_Basic.java
@@ -331,7 +331,7 @@ public class T0003_Basic extends RepositoryTestCase {
t.tag();
assertEquals("6759556b09fbb4fd8ae5e315134481cc25d46954", t.getTagId().toString());
- Tag mapTag = db.mapTag("6759556b09fbb4fd8ae5e315134481cc25d46954");
+ Tag mapTag = db.mapTag("test020");
assertEquals("blob", mapTag.getType());
assertEquals("test020 tagged\n", mapTag.getMessage());
assertEquals(new PersonIdent(jauthor, 1154236443000L, -4 * 60), mapTag.getAuthor());
@@ -365,7 +365,7 @@ public class T0003_Basic extends RepositoryTestCase {
t.tag();
assertEquals("b0517bc8dbe2096b419d42424cd7030733f4abe5", t.getTagId().toString());
- Tag mapTag = db.mapTag("b0517bc8dbe2096b419d42424cd7030733f4abe5");
+ Tag mapTag = db.mapTag("test021");
assertEquals("tree", mapTag.getType());
assertEquals("test021 tagged\n", mapTag.getMessage());
assertEquals(new PersonIdent(jauthor, 1154236443000L, -4 * 60), mapTag.getAuthor());
@@ -392,7 +392,7 @@ public class T0003_Basic extends RepositoryTestCase {
t.tag();
assertEquals("0ce2ebdb36076ef0b38adbe077a07d43b43e3807", t.getTagId().toString());
- Tag mapTag = db.mapTag("0ce2ebdb36076ef0b38adbe077a07d43b43e3807");
+ Tag mapTag = db.mapTag("test022");
assertEquals("commit", mapTag.getType());
assertEquals("test022 tagged\n", mapTag.getMessage());
assertEquals(new PersonIdent(jauthor, 1154236443000L, -4 * 60), mapTag.getAuthor());
--
1.5.1.1
next prev parent reply other threads:[~2007-05-13 23:59 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-13 23:39 This week in EGIT - more tags Robin Rosenberg
2007-05-13 23:39 ` [PATCH] Implement simple tags Robin Rosenberg
2007-05-13 23:39 ` Robin Rosenberg [this message]
2007-05-13 23:39 ` [PATCH] Implement packed refs Robin Rosenberg
2007-05-13 23:39 ` [PATCH] Show tags in history view Robin Rosenberg
2007-05-14 22:45 ` [PATCH] Implement packed refs Shawn O. Pearce
2007-05-14 22:49 ` Robin Rosenberg
2007-05-13 23:48 ` The first patch in the series Robin Rosenberg
2007-05-13 23:48 ` [PATCH] Require JDK1.5 Robin Rosenberg
2007-05-14 1:07 ` Grzegorz Kulewski
2007-05-14 7:21 ` Noel Grandin
2007-05-14 17:24 ` Robin Rosenberg
2007-05-14 20:56 ` [PATCH] Set required execution enviroment Robin Rosenberg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=11790995573817-git-send-email-robin.rosenberg@dewire.com \
--to=robin.rosenberg@dewire.com \
--cc=git@vger.kernel.org \
--cc=spearce@spearce.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).