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

Re: [PATCH v3 2/3] config: add 'type' to config_source struct that identifies config type

From
Jeff King <peff@peff.net>
Date
Feb 14, 2016, 16:07 UTC
Message-ID
<20160214160734.GB5875@sigill.intra.peff.net>
In-Reply-To
<394CD8BC-49CF-4D07-A9C2-CC8C60373A2B@gmail.com>
On Sun, Feb 14, 2016 at 01:24:55PM +0100, Lars Schneider wrote:
Show 7 quoted lines
> > 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
Previous: Lars SchneiderNext: larsxschneider@gmail.com
Message 13 of 25 in “config: add '--sources' option to print the source of a config value”
  1. 0/3 config: add '--sources' option to print the source of a config valuelarsxschneider@gmail.com, Feb 13, 2016
  2. 1/3 git-config.txt: describe '--includes' default behaviorlarsxschneider@gmail.com, Feb 13, 2016
  3. Jeff KingFeb 13, 2016
  4. Junio C HamanoFeb 13, 2016
  5. Jeff KingFeb 14, 2016
  6. Lars SchneiderFeb 14, 2016
  7. Jeff KingFeb 14, 2016
  8. 2/3 config: add 'type' to config_source struct that identifies config typelarsxschneider@gmail.com, Feb 13, 2016
  9. Jeff KingFeb 13, 2016
  10. Junio C HamanoFeb 13, 2016
  11. Lars SchneiderFeb 14, 2016
  12. Lars SchneiderFeb 14, 2016
  13. Jeff KingFeb 14, 2016
  14. 3/3 config: add '--show-origin' option to print the origin of a config valuelarsxschneider@gmail.com, Feb 13, 2016
  15. Jeff KingFeb 13, 2016
  16. Jeff KingFeb 13, 2016
  17. Jeff KingFeb 13, 2016
  18. Lars SchneiderFeb 15, 2016
  19. Lars SchneiderFeb 14, 2016
  20. Jeff KingFeb 14, 2016
  21. Johannes SchindelinFeb 15, 2016
  22. Mike RappazzoFeb 13, 2016
  23. Sebastian SchuberthFeb 13, 2016
  24. Jeff KingFeb 13, 2016
  25. Junio C HamanoFeb 13, 2016

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.