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

Re: Git in next is broken

From
EREric Raible <raible@gmail.com>
Date
Nov 13, 2009, 20:20 UTC
Message-ID
<loom.20091113T211800-4@post.gmane.org>
In-Reply-To
<alpine.LFD.2.00.0911131152120.16711@xanadu.home>
Nicolas Pitre <nico <at> fluxnic.net> writes:
 > diff --git a/remote.c b/remote.c
Show 11 quoted lines
> > index 4f9f0cc..6195a58 100644
> > --- a/remote.c
> > +++ b/remote.c
> > @@ -754,6 +754,8 @@ void ref_remove_duplicates(struct ref *ref_map)
> >                         prev->next = ref_map->next;
> >                         free(ref_map->peer_ref);
> >                         free(ref_map);
> > +                       ref_map = prev; // Keep the same prev.
> > +                       continue;
> >                 }
> > 

This is one of those example where the comment is essentially useless. Wouldn't something like "// Skip the freed item" be more useful?

- Eric
Previous: Nicolas PitreNext: Julian Phillips
Message 7 of 8 in “Git in next is broken”
  1. Nicolas PitreNov 12, 2009
  2. René ScharfeNov 12, 2009
  3. Julian PhillipsNov 12, 2009
  4. Nicolas PitreNov 13, 2009
  5. Julian PhillipsNov 13, 2009
  6. Nicolas PitreNov 13, 2009
  7. Eric RaibleNov 13, 2009
  8. remote: Fix glibc error in ref_remove_duplicatesJulian Phillips, Nov 13, 2009

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.