All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Sixt <j.sixt@viscovery.net>
To: Jakub Narebski <jnareb@gmail.com>
Cc: Matthias Andree <matthias.andree@gmx.de>,
	Jeff King <peff@peff.net>, Junio C Hamano <gitster@pobox.com>,
	git@vger.kernel.org, Alex Riesen <raa.lkml@gmail.com>,
	Brandon Casey <casey@nrlssc.navy.mil>,
	Sverre Rabbelier <srabbelier@gmail.com>
Subject: Re: git-tag bug? confusing git fast-export with double tag objects
Date: Fri, 15 May 2009 16:54:09 +0200	[thread overview]
Message-ID: <4A0D8211.5010806@viscovery.net> (raw)
In-Reply-To: <m34ovmlcve.fsf@localhost.localdomain>

Jakub Narebski schrieb:
> "Matthias Andree" <matthias.andree@gmx.de> writes:
>> 	commit <-- signed-by-- NIL (removed) <--signed-by-- tag1.
> 
> THIS IS A FEATURE, NOT A BUG.

Please stop it. Everone agrees about this.

Matthias only wants a patch like below. Matthias, if you are serious about
it, please pick this up and turn it into a proper submission. I don't care
enough.

-- Hannes


diff --git a/builtin-tag.c b/builtin-tag.c
index 01e7374..35d39a2 100644
--- a/builtin-tag.c
+++ b/builtin-tag.c
@@ -367,6 +367,7 @@ int cmd_tag(int argc, const char **argv, const char
*prefix)
 	unsigned char object[20], prev[20];
 	char ref[PATH_MAX];
 	const char *object_ref, *tag;
+	struct tag *tag_object;
 	struct ref_lock *lock;

 	int annotate = 0, sign = 0, force = 0, lines = -1,
@@ -472,6 +473,15 @@ int cmd_tag(int argc, const char **argv, const char
 	else if (!force)
 		die("tag '%s' already exists", tag);

+	if ((tag_object = (struct tag *)parse_object(object)) &&
+	    tag_object->object.type == OBJ_TAG &&
+	    tag_object->tag &&
+	    !strcmp(tag_object->tag, tag)) {
+		error("A tag cannot tag itself. If you meant to tag the commit");
+		error("that the tag refers to, use 'git tag %s %s^{}'.", tag, object_ref);
+		exit(1);
+	}
+
 	if (annotate)
 		create_tag(object, tag, &buf, msg.given || msgfile,
 			   sign, prev, object);

  reply	other threads:[~2009-05-15 14:54 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-14  0:53 git-tag bug? confusing git fast-export with double tag objects Matthias Andree
2009-05-14  2:13 ` Matthias Andree
2009-05-14  3:18   ` Junio C Hamano
2009-05-14  9:37     ` Matthias Andree
2009-05-14 12:00       ` Michael J Gruber
2009-05-14 12:16       ` Alex Riesen
2009-05-14 12:51         ` Matthias Andree
2009-05-14 13:16           ` Alex Riesen
2009-05-14 13:39             ` Matthias Andree
2009-05-14 13:42               ` Sverre Rabbelier
2009-05-14 18:02                 ` Matthias Andree
2009-05-14 19:01                   ` Brandon Casey
2009-05-14 18:22       ` Jeff King
2009-05-14 22:35         ` Matthias Andree
2009-05-15  2:02           ` Jeff King
2009-05-15 12:23             ` Matthias Andree
2009-05-15 13:22               ` Jakub Narebski
2009-05-15 14:54                 ` Johannes Sixt [this message]
2009-05-15 15:51                   ` Alex Riesen
2009-05-15 16:14                     ` Matthias Andree
2009-05-15 16:21                     ` Andreas Ericsson
2009-05-15 17:40                       ` Junio C Hamano
2009-05-16  7:14                         ` Andreas Ericsson
2009-05-16  7:56                           ` Jakub Narebski
2009-05-16  8:02                             ` Andreas Ericsson
2009-05-16 17:16                           ` Junio C Hamano
2009-05-19 11:21                             ` Matthias Andree
2009-05-19 11:29                               ` Jeff King
2009-05-16  5:07               ` Jeff King
2009-05-15 16:00       ` Daniel Cheng

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=4A0D8211.5010806@viscovery.net \
    --to=j.sixt@viscovery.net \
    --cc=casey@nrlssc.navy.mil \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jnareb@gmail.com \
    --cc=matthias.andree@gmx.de \
    --cc=peff@peff.net \
    --cc=raa.lkml@gmail.com \
    --cc=srabbelier@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.