On Tue, Jun 11, 2013 at 12:33 PM, Junio C Hamano <gits...@pobox.com> wrote:
> Felipe Contreras <felipe.contre...@gmail.com> writes:
>>> - There may be pieces of usefully reusable code buried in
>>> - By definition, any code (piece of data or function definition) in
>>> builtin/*.o cannot be used in standalone binaries, because all of
>>> builtin/*.o expect to link with git.o and expect their cmd_foo()
>>> getting called from main in it;
>>> - By moving the useful reusable pieces ont of builtin/*.o and
>>> adding them to libgit.a, these pieces become usable from
>>> standalone binaries as well.
>> What if these reusable pieces should not be used by standalone binaries?
> I am not sure what you mean. A piece is either reusable or not.
It can be reusable for A, but not for B. A being the 'git' binary, B
being other standalone binaries.
>> But this doesn't answer the question; what about code that is shared
>> between builtins, but cannot be used by standalone programs?
> Again, I do not know what you mean by "cannot" here. My tentative
> answer to that question is "the eventual goal should be not to have
> any code in that class, and that is a reasonable goal we can achieve
> once we refactor what ought to be reusable out of builtin/*.o".
> 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.
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html