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

Re: [PATCH] build: get rid of the notion of a git library

From
Vincent van Ravesteijn <vfr@lyx.org>
Date
Jun 9, 2013, 17:30 UTC
Message-ID
<51B4BBB7.8060807@lyx.org>
In-Reply-To
<CAMP44s0L9nQxp5OeK8uT4Ls5WUerCjVpR9uONUcOwvTD6k7Jfg@mail.gmail.com>
Op 9-6-2013 17:40, Felipe Contreras schreef:
Show 31 quoted lines
> On Sun, Jun 9, 2013 at 10:12 AM, John Keeping <john@keeping.me.uk> wrote:
>> On Sun, Jun 09, 2013 at 08:26:32PM +0530, Ramkumar Ramachandra wrote:
>>> Felipe Contreras wrote:
>>>> The plan is simple; make libgit.a a proper library, starting by
>>>> clarifying what goes into libgit.a, and what doesn't. If there's any
>>>> hopes of ever having a public library, it's clear what code doesn't
>>>> belong in libgit.a; code that is meant for builtins, that code belongs
>>>> in builtins/lib.a, or similar.
>>>>
>>>> Give this a try:
>>>>
>>>> --- a/sequencer.c
>>>> +++ b/sequencer.c
>>>>
>>>> libgit.a(sequencer.o): In function `copy_notes':
>>>> /home/felipec/dev/git/sequencer.c:110: undefined reference to
>>>> `init_copy_notes_for_rewrite'
>>>> /home/felipec/dev/git/sequencer.c:114: undefined reference to
>>>> `finish_copy_notes_for_rewrite'
>>> This is a good example: yes, I'm convinced that the code does need to
>>> be reorganized.  Please resend your {sequencer.c ->
>>> builtin/sequencer.c} patch with this example as the rationale, and
>>> let's work towards improving libgit.a.
>> Why should sequencer.c move into builtin/ to solve this?  Why not pull
>> init_copy_notes_for_rewrite and finish_copy_notes_for_rewrite up into
>> notes.c?
> Because finish_copy_notes_for_rewrite is only useful for builtin
> commands, so it belongs in builtin/. If there's any meaning to the
> ./*.o vs. builtin/*.o divide, it's for that. Otherwise we should just
> squash all objects into libgit.a and be done with it.
>

I think that libgit.a should contain all code to be able to carry out all functions of git. The stuff in builtin/ is just a command-line user interface. Whether or not sequencer should be in builtin depends on whether the sequencer is only part of this command-line user interface.

I think that the sequencer code is at the moment unusable if you do not use the code in builtin/ so that would advocate to move it into builtin/. If sequencer is in libgit, and I write my own (graphical) user interface, I expect to be able to use it.

Vincent
Previous: Ramkumar RamachandraNext: Felipe Contreras
Message 16 of 59 in “build: get rid of the notion of a git library”
  1. build: get rid of the notion of a git libraryFelipe Contreras, Jun 8, 2013
  2. Ramkumar RamachandraJun 8, 2013
  3. Felipe ContrerasJun 8, 2013
  4. Ramkumar RamachandraJun 9, 2013
  5. John KeepingJun 9, 2013
  6. Felipe ContrerasJun 9, 2013
  7. John KeepingJun 9, 2013
  8. Felipe ContrerasJun 9, 2013
  9. John KeepingJun 9, 2013
  10. Ramkumar RamachandraJun 9, 2013
  11. Ramkumar RamachandraJun 9, 2013
  12. Felipe ContrerasJun 9, 2013
  13. John KeepingJun 9, 2013
  14. Felipe ContrerasJun 9, 2013
  15. Ramkumar RamachandraJun 9, 2013
  16. Vincent van RavesteijnJun 9, 2013
  17. Felipe ContrerasJun 9, 2013
  18. Jeff KingJun 10, 2013
  19. Felipe ContrerasJun 10, 2013
  20. Jeff KingJun 10, 2013
  21. Felipe ContrerasJun 10, 2013
  22. Junio C HamanoJun 10, 2013
  23. Junio C HamanoJun 10, 2013
  24. Felipe ContrerasJun 10, 2013
  25. Junio C HamanoJun 11, 2013
  26. Junio C HamanoJun 11, 2013
  27. Felipe ContrerasJun 11, 2013
  28. Junio C HamanoJun 11, 2013
  29. Felipe ContrerasJun 11, 2013
  30. Junio C HamanoJun 11, 2013
  31. Felipe ContrerasJun 11, 2013
  32. Linus TorvaldsJun 11, 2013
  33. Felipe ContrerasJun 11, 2013
  34. Junio C HamanoJun 11, 2013
  35. Felipe ContrerasJun 11, 2013
  36. 0/3 Refactor useful notes functions into notes-utils.[ch]Johan Herland, Jun 12, 2013
  37. 1/3 finish_copy_notes_for_rewrite(): Let caller provide commit messageJohan Herland, Jun 12, 2013
  38. Junio C HamanoJun 12, 2013
  39. 2/3 Move copy_note_for_rewrite + friends from builtin/notes.c to notes-utils.cJohan Herland, Jun 12, 2013
  40. Felipe ContrerasJun 12, 2013
  41. Johan HerlandJun 12, 2013
  42. Felipe ContrerasJun 12, 2013
  43. Johan HerlandJun 12, 2013
  44. Felipe ContrerasJun 12, 2013
  45. Andreas KreyJun 13, 2013
  46. Felipe ContrerasJun 13, 2013
  47. Junio C HamanoJun 12, 2013
  48. 3/3 Move create_notes_commit() from notes-merge.c into notes-utils.cJohan Herland, Jun 12, 2013
  49. Junio C HamanoJun 12, 2013
  50. Felipe ContrerasJun 12, 2013
  51. Junio C HamanoJun 13, 2013
  52. Felipe ContrerasJun 13, 2013
  53. Felipe ContrerasJun 13, 2013
  54. Junio C HamanoJun 11, 2013
  55. Felipe ContrerasJun 11, 2013
  56. Junio C HamanoJun 11, 2013
  57. Felipe ContrerasJun 11, 2013
  58. Felipe ContrerasJun 11, 2013
  59. Felipe ContrerasJun 9, 2013

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.