On Sun, Feb 14, 2016 at 01:24:55PM +0100, Lars Schneider wrote:
quoted
Should git_config_from_buf() take a "type" parameter, and
git_config_from_blob_sha1() pass in "blob"?
Haha, fun fact: this was how I implemented it initially. Because of that
I noticed that "submodule-config.c" also uses "git_config_from_buf" :-)
However, then I thought the list wouldn't like it if I change the
interfaces. I will add the type parameter, again.
Changing internal interfaces is preferable to carrying a sub-optimal
interface forever, I think.
The thing we really have to watch out for is changing the assumptions or
output of a function without changing its signature. The interface
change breaks loudly on a merge, and is easy to fix. Changing the
internals creates quiet and subtle bugs.
-Peff