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

Re: [PATCH] mailmap: fix check for freeing memory

From
Jeff King <peff@peff.net>
Date
Aug 20, 2013, 14:27 UTC
Message-ID
<20130820142755.GA839@sigill.intra.peff.net>
In-Reply-To
<52137A63.3010609@googlemail.com>
On Tue, Aug 20, 2013 at 04:17:07PM +0200, Stefan Beller wrote:
> Stepping two steps back, I am trying to figure out, what this repo_abrev
> thing is doing, as I could find no documentation.

It's meant to abbreviate long pathnames in subject lines. As you noted, the kernel .mailmap has:

  # repo-abbrev: /pub/scm/linux/kernel/git/
Try "git shortlog" in the kernel and grep for "..." to see its effect.

It is IMHO a misfeature to have it as part of .mailmap, but it is there for historical reasons. And I think it is not really needed these days anyway, as the messages created by git-merge are nicer to read in the first place (and people tend to use nice readable URLs for accessing one-off git pulls, too).

> So we're passing there an address, which was just set to zero.
> This is the only occurence of passing a value at all and the value
> being passed is 0, so the free in the original patch doesn't need
> that check either.

Right. I think the intent was to free a previously found repo-abbrev line to avoid leaking memory (although arguably, it would make sense to keep a list and abbreviate all that we find, I don't think anybody cares anymore for the reasons I stated above).

-Peff
Previous: Jeff King
Message 12 of 12 in “mailmap: fix check for freeing memory”
  1. mailmap: fix check for freeing memoryStefan Beller, Aug 20, 2013
  2. Thomas RastAug 20, 2013
  3. Jeff KingAug 20, 2013
  4. Stefan BellerAug 20, 2013
  5. mailmap: remove redundant check for freeing memoryStefan Beller, Aug 20, 2013
  6. Jeff KingAug 20, 2013
  7. Thomas RastAug 20, 2013
  8. Stefan BellerAug 20, 2013
  9. Jeff KingAug 20, 2013
  10. Junio C HamanoAug 20, 2013
  11. Jeff KingAug 20, 2013
  12. Jeff KingAug 20, 2013

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.