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

Re: libgit2 status

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 19, 2012, 22:43 UTC
Message-ID
<7v4nlqhymd.fsf@alter.siamese.dyndns.org>
In-Reply-To
<7vvce6i5j2.fsf@alter.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> writes:
Show 18 quoted lines
> Ramkumar Ramachandra <artagnon@gmail.com> writes:
>
>> Thiago Farina wrote:
>>> [...]
>>> With some structure like:
>>>
>>> include/git.h
>>> src/git.c
>>>
>>> ...
>>>
>>> whatever.
>>> [...]
>>
>> Junio- is it reasonable to expect the directory-restructuring by 2.0?
>
> I actually hate "include/git.h vs src/git.c"; you have distinction
> between .c and .h already.

Having said that, I do not mind moving codeblocks around to make some files purely library-ish while others purely commands.

Ideally, if you run
    $ nm --defined-only -g builtin/frotz.o

you should see nothing but "T cmd_frotz" (there are exceptions, most notably, what the commands in the "log" family do are so close with each other that builtin/log.o can define cmd_* for all of them).

    $ nm --defined-only -og builtin/*.o  | grep -v 'T cmd_'

a handful of offenders. If these functions with external linkage are truly useful across subcommands, we should move them to a more library-ish location.

It may require splitting the bits that are too closely tied to the external interface they are implementing from these functions, generalizing only the core-ish logic from them, and moving them to a more library-ish file as a preparatory step. Such a library-ish file may be created inside lib/ subdirectory from the get-go.

Until that kind of code restructure happens, I do not see much sense in just moving files, e.g. renaming revision.c to src/revision.c or lib/revision.c or somesuch.

Previous: dag@cray.comNext: Thiago Farina
Message 21 of 23 in “libgit2 status”
  1. greened@obbligato.orgAug 24, 2012
  2. Andreas EricssonAug 25, 2012
  3. Vicent MartiAug 25, 2012
  4. Nicolas SebrechtAug 25, 2012
  5. Carlos Martín NietoAug 25, 2012
  6. Elia PintoAug 26, 2012
  7. Junio C HamanoAug 26, 2012
  8. Junio C HamanoAug 26, 2012
  9. dag@cray.comAug 27, 2012
  10. Junio C HamanoAug 27, 2012
  11. dag@cray.comAug 27, 2012
  12. Junio C HamanoAug 27, 2012
  13. dag@cray.comAug 27, 2012
  14. Nicolas SebrechtAug 27, 2012
  15. dag@cray.comAug 28, 2012
  16. Junio C HamanoAug 28, 2012
  17. Thiago FarinaOct 19, 2012
  18. Ramkumar RamachandraOct 19, 2012
  19. Junio C HamanoOct 19, 2012
  20. dag@cray.comOct 19, 2012
  21. Junio C HamanoOct 19, 2012
  22. Thiago FarinaOct 20, 2012
  23. Andreas EricssonOct 20, 2012

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.