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