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

Re: libgit2 - a true git library

From
Pierre Habouzit <madcoder@debian.org>
Date
Oct 31, 2008, 18:54 UTC
Message-ID
<20081031185435.GC8464@artemis.corp>
In-Reply-To
<20081031184154.GV14786@spearce.org>
On Fri, Oct 31, 2008 at 06:41:54PM +0000, Shawn O. Pearce wrote:
> Pierre Habouzit <madcoder@debian.org> wrote:
> How about this?
> 
> http://www.spearce.org/projects/scm/libgit2/apidocs/CONVENTIONS
looks like a good start.
Show 13 quoted lines
> > Second, if we want this to be a successful stuff, we all agree we must
> > let git be able to use it medium term. That means that when git-core is
> > experimenting with new interfaces, it will probably need to hook into
> > some more internal aspects of the library. This is a problem to solve
> > elegantly, linking git against a static library won't please a lot of
> > vendors and linux distributions, and exporting "private" symbols is a
> > sure way to see them being abused.
> 
> Private symbols are a problem.  On some systems we can use link
> editing to strip them out of the .so, but that isn't always going to
> work everywhere.  I've outlined the idea of using double underscore
> to name private functions, and we can link-edit out '*__*' if the
> platform's linker supports it (e.g. GNU ld).

Well, I propose the following: we set-up on GNU-ld + gcc enabled systems all what is needed to use symbol visibility, which isn't that intrusive, and also rather easy given your GIT_EXPORT macro definition.

This way, people who care about portability across all libgit2 supported platforms will have to align on the lowest common denominator, which will not have any kind of private stuff available, so we're safe. And GCC/GNU-ld enabled platforms cover most of the popular platforms (namely linux and *BSD, I'm not sure about Macos dynlibs). Even win32 has kind of what you need to do visibility I think.

IOW prehistoric systems will be have to cope with that because of Linux (yeah, this is kind of deliciously backwards ;p).

No, my worry was rather wrt git core itself, I really think we _must_ make it link against libgit2 if we want libgit2 to stay current, but git core will _very likely_ need the private stuff, and it _will_ be a problem. I mean we cannot seriously so-name a library and show its guts at the same time, and I'm unsure how to fix that problem. _that_ was my actual question.

Show 14 quoted lines
> > Last but not least, I believe parts of git-core are currently easy to
> > just take. For example, any code *I* wrote, I hereby give permission to
> > relicense it in any of the following licenses: BSD-like, MIT-like,
> > WTFPL.
> 
> Yea.  We could try to do that.  I don't know how far it will get us,
> but if we have to "steal" code we can rip a good part from JGit.
> Its BSD-like, but has that "icky Java smell" to it.  :-)
> 
> Before worrying about where we get implementation bits from I'm
> more interested in trying to get a consistent view of what our
> namespace looks like, and what our calling conventions are, so we
> have some sort of benchmark to measure APIs against as we add them
> to the implementation.

I'd say we should do both at the same time. Asking people if they would agree to relicense code can be done in parallel. We could extract a list of source files that we may need (my extraction included stuff that is very unlikely to be useful like test-*.c that aren't useful, and some that are already BSD I think), and see who it yields. It should be possible to do a matrix source-file x people and see on a per-file basis what they think.

If someone gives me the list of files we should consider (I'm not sure about a good list right now) I could do the matrix at some fixed sha1 from git.git using git blame -C -M -M -w, and ask people see where it leads us ?

-- 
·O·  Pierre Habouzit
··O                                                madcoder@debian.org
OOO                                                http://www.madism.org
Previous: Shawn O. PearceNext: Shawn O. Pearce
Message 6 of 83 in “libgit2 - a true git library”
  1. Shawn O. PearceOct 31, 2008
  2. Pieter de BieOct 31, 2008
  3. Pieter de BieOct 31, 2008
  4. Pierre HabouzitOct 31, 2008
  5. Shawn O. PearceOct 31, 2008
  6. Pierre HabouzitOct 31, 2008
  7. Shawn O. PearceOct 31, 2008
  8. Pierre HabouzitOct 31, 2008
  9. Junio C HamanoOct 31, 2008
  10. Shawn O. PearceOct 31, 2008
  11. Pierre HabouzitNov 1, 2008
  12. Andreas EricssonNov 1, 2008
  13. Pierre HabouzitNov 1, 2008
  14. Shawn O. PearceNov 1, 2008
  15. Andreas EricssonNov 1, 2008
  16. Shawn O. PearceNov 2, 2008
  17. Andreas EricssonNov 3, 2008
  18. Shawn O. PearceNov 2, 2008
  19. Pierre HabouzitNov 2, 2008
  20. Nicolas PitreOct 31, 2008
  21. david@lang.hmOct 31, 2008
  22. Nicolas PitreOct 31, 2008
  23. Shawn O. PearceOct 31, 2008
  24. Shawn O. PearceOct 31, 2008
  25. Pierre HabouzitOct 31, 2008
  26. Pierre HabouzitOct 31, 2008
  27. Nicolas PitreOct 31, 2008
  28. Andreas EricssonNov 1, 2008
  29. Pieter de BieOct 31, 2008
  30. Shawn O. PearceOct 31, 2008
  31. Junio C HamanoOct 31, 2008
  32. Pierre HabouzitNov 1, 2008
  33. Shawn O. PearceNov 1, 2008
  34. Pierre HabouzitNov 1, 2008
  35. Shawn O. PearceNov 1, 2008
  36. Nicolas PitreNov 1, 2008
  37. Shawn O. PearceNov 1, 2008
  38. Nicolas PitreNov 1, 2008
  39. Shawn O. PearceNov 1, 2008
  40. Johannes SchindelinNov 1, 2008
  41. Pierre HabouzitNov 1, 2008
  42. Nicolas PitreNov 1, 2008
  43. Pierre HabouzitNov 1, 2008
  44. Johannes SchindelinNov 1, 2008
  45. Junio C HamanoOct 31, 2008
  46. Pierre HabouzitOct 31, 2008
  47. Shawn O. PearceOct 31, 2008
  48. Jakub NarebskiOct 31, 2008
  49. david@lang.hmNov 1, 2008
  50. Shawn O. PearceNov 1, 2008
  51. david@lang.hmNov 1, 2008
  52. Pierre HabouzitNov 1, 2008
  53. Nicolas PitreNov 1, 2008
  54. Pierre HabouzitNov 1, 2008
  55. Nicolas PitreNov 1, 2008
  56. Shawn O. PearceNov 1, 2008
  57. Nicolas PitreNov 1, 2008
  58. Shawn O. PearceNov 1, 2008
  59. Scott ChaconNov 2, 2008
  60. Scott ChaconNov 2, 2008
  61. Shawn O. PearceNov 2, 2008
  62. David BrownNov 2, 2008
  63. Shawn O. PearceNov 3, 2008
  64. Pierre HabouzitNov 1, 2008
  65. david@lang.hmNov 1, 2008
  66. Brian GernhardtOct 31, 2008
  67. Andreas EricssonOct 31, 2008
  68. Shawn O. PearceOct 31, 2008
  69. Junio C HamanoOct 31, 2008
  70. Andreas EricssonNov 1, 2008
  71. Johannes SchindelinOct 31, 2008
  72. Bruno SantosOct 31, 2008
  73. Shawn O. PearceOct 31, 2008
  74. Andreas EricssonNov 1, 2008
  75. Shawn O. PearceNov 1, 2008
  76. Johannes SchindelinNov 2, 2008
  77. Pierre HabouzitNov 2, 2008
  78. Andreas EricssonNov 3, 2008
  79. Steve FrécinauxNov 8, 2008
  80. Andreas EricssonNov 8, 2008
  81. Pierre HabouzitNov 8, 2008
  82. Andreas EricssonNov 9, 2008
  83. Shawn O. PearceNov 9, 2008

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.