Subject: Re: [PATCH v6 18/19] fsck: git receive-pack: support excluding objects from fsck'ing

From: Junio C Hamano <[email-masked]>
Date: Sat, 20 Jun 2015 10:28:53 -0700

Johannes Schindelin <[email-masked]> writes:

> There is a problem, though: `git_config_pathname()` accepts a
> `const char **` parameter to set the path, yet I need to `free()`
> that pointer afterwards because it has been obtained through
> `expand_user_path()` which detaches that buffer from a `strbuf`.

"I have 'const char *' because I do not ever change the string
myself after getting it from an API function, but free() does not
want to free a const pointer" occurs sometimes in our codebase and
it is OK to cast the constness away (many callsites to free()
already do so).