From: Johannes Schindelin Date: Wed, 02 Nov 2005 20:47:46 GMT Subject: Re: [PATCH] Warn when calling deref_tag() on broken tags Message-ID: In-Reply-To: <20051102204101.GE1431@pasky.or.cz> Hi, On Wed, 2 Nov 2005, Petr Baudis wrote: > diff --git a/tag.c b/tag.c > index b1ab75f..9cd09cf 100644 > --- a/tag.c > +++ b/tag.c > @@ -3,10 +3,18 @@ > > const char *tag_type = "tag"; > > -struct object *deref_tag(struct object *o) > +/* The refname argument is optional and suitable to use only if > + * we use this to resolve an actual tag ref. */ > +struct object *deref_tag(struct object *o, const char *refname) How about leaving dereg_tag's signature alone, and warn something like "You have a broken tag (sha1=%s).\n" "To find out which name(s) it corresponds to, execute\n" "\tgit-name-rev --tags %s\n" What do you think? Ciao, Dscho