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

Re: [PATCH] Warn when calling deref_tag() on broken tags

From
Petr Baudis <pasky@suse.cz>
Date
Nov 2, 2005, 20:50 UTC
Message-ID
<20051102205058.GF1431@pasky.or.cz>
In-Reply-To
<Pine.LNX.4.63.0511022145010.13989@wbgn013.biozentrum.uni-wuerzburg.de>

Dear diary, on Wed, Nov 02, 2005 at 09:47:46PM CET, I got a letter where Johannes Schindelin <Johannes.Schindelin@gmx.de> told me that...

Show 21 quoted lines
> 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?

I don't know. For multiple broken tags, or multiple invocations of deref_tag() on the same tag, this will fill a lot of screen estate. And if we mostly actually have this information, why not show it to the user right aay?

-- 
				Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
VI has two modes: the one in which it beeps and the one in which
it doesn't.
Previous: Johannes SchindelinNext: Junio C Hamano
Message 6 of 9 in “Fix segfaults caused by invalid tags”
  1. Fix segfaults caused by invalid tagsPetr Baudis, Nov 2, 2005
  2. Johannes SchindelinNov 2, 2005
  3. Junio C HamanoNov 2, 2005
  4. Warn when calling deref_tag() on broken tagsPetr Baudis, Nov 2, 2005
  5. Johannes SchindelinNov 2, 2005
  6. Petr BaudisNov 2, 2005
  7. Junio C HamanoNov 2, 2005
  8. Junio C HamanoNov 2, 2005
  9. Petr BaudisNov 2, 2005

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.