Re: [PATCH] build: get rid of the notion of a git library
- From
Felipe Contreras <felipe.contreras@gmail.com>
- Date
- Jun 11, 2013, 18:06 UTC
- Message-ID
- <CAMP44s02KaMaMUz4618n5RqVqVSXzr_D9rPS1uesy2XEdqnq5A@mail.gmail.com>
- In-Reply-To
- <7vppvsbkc3.fsf@alter.siamese.dyndns.org>
On Tue, Jun 11, 2013 at 12:58 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 15 quoted lines
> Felipe Contreras <felipe.contreras@gmail.com> writes: > >>> What are the examples you have in mind, code that we want to forbid >>> standalone from using? >> >> init_copy_notes_for_rewrite(). Nothing outside the 'git' binary would >> need that. If you disagree, show me an example. > > "Nothing would need that", if you are talking about the current > codebase, I would agree that nothing would link to it. > > But that is not a good justification for closing door to others that > come later who may want to have a standalone that would want to use > it. Think about rewriting filter-branch.sh in C but not as a > built-in, for example.
Why would anybody rewrite filter-branch, and not make it a builtin? It should be a builtin. That's the whole point of builtins.
Moreover, if you are going to argue that we shouldn't be closing the door, then why not link ./builtin/*.o to libgit.a? If you are seriously considering the highly unlikely hypothetical standalone git-filter-branch scenario, you should consider the even more likely scenario where somebody needs to access code from ./builtin/*.o; that scenario is not even hypothetical, we know it's happened multiple times, and we know it's going to happen again.
-- Felipe Contreras