From: Felipe Contreras Date: Tue, 11 Jun 2013 18:06:27 GMT Subject: Re: [PATCH] build: get rid of the notion of a git library Message-ID: In-Reply-To: <7vppvsbkc3.fsf@alter.siamese.dyndns.org> On Tue, Jun 11, 2013 at 12:58 PM, Junio C Hamano wrote: > Felipe Contreras 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