Re: [PATCH] build: get rid of the notion of a git library
From: John Keeping <hidden>
Date: 2016-06-15 22:57:38
From: John Keeping <hidden>
Date: 2016-06-15 22:57:38
On Sun, Jun 09, 2013 at 11:22:06AM -0500, Felipe Contreras wrote:
On Sun, Jun 9, 2013 at 11:02 AM, John Keeping [off-list ref] wrote:quoted
But we make a distinction between things that are specific to one command (especially argument parsing and user interaction) and more generally useful features.No, we don't. Everything under ./*.o goes to libgit.a, and everything under ./builtin/*.o goes to 'git'. So builtin/commit.o can access code from builtin/notes.o, but sequencer.o can't.
I would argue that it was a mistake not to extract these functions from builtin/notes.c to notes.c when builtin/commit.c started using them. Calling across from one builtin/*.c file to another is just as wrong as calling into a builtin/*.c file from a top-level file but the build system happens not to enforce the former.