From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Keeping Subject: Re: [PATCH] build: get rid of the notion of a git library Date: Sun, 9 Jun 2013 17:42:49 +0100 Message-ID: <20130609164248.GD22905@serenity.lan> References: <1370712574-27688-1-git-send-email-felipe.contreras@gmail.com> <20130609151235.GA22905@serenity.lan> <20130609160225.GB22905@serenity.lan> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Ramkumar Ramachandra , git@vger.kernel.org, Junio C Hamano , Jonathan Nieder , Jeff King , Duy Nguyen To: Felipe Contreras X-From: git-owner@vger.kernel.org Sun Jun 09 18:45:42 2013 Return-path: Envelope-to: gcvg-git-2@plane.gmane.org Received: from vger.kernel.org ([209.132.180.67]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UlikQ-00087f-9B for gcvg-git-2@plane.gmane.org; Sun, 09 Jun 2013 18:45:42 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751217Ab3FIQnI (ORCPT ); Sun, 9 Jun 2013 12:43:08 -0400 Received: from jackal.aluminati.org ([72.9.247.210]:42595 "EHLO jackal.aluminati.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750871Ab3FIQnE (ORCPT ); Sun, 9 Jun 2013 12:43:04 -0400 Received: from localhost (localhost [127.0.0.1]) by jackal.aluminati.org (Postfix) with ESMTP id 467D8CDA2D4; Sun, 9 Jun 2013 17:43:04 +0100 (BST) X-Virus-Scanned: Debian amavisd-new at serval.aluminati.org X-Spam-Flag: NO X-Spam-Score: -12.899 X-Spam-Level: X-Spam-Status: No, score=-12.899 tagged_above=-9999 required=6.31 tests=[ALL_TRUSTED=-1, ALUMINATI_LOCAL_TESTS=-10, BAYES_00=-1.9, URIBL_BLOCKED=0.001] autolearn=ham Received: from jackal.aluminati.org ([127.0.0.1]) by localhost (jackal.aluminati.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 1PFtluJk1APA; Sun, 9 Jun 2013 17:43:03 +0100 (BST) Received: from pichi.aluminati.org (pichi.aluminati.org [10.0.16.50]) by jackal.aluminati.org (Postfix) with ESMTP id CE82FCDA596; Sun, 9 Jun 2013 17:43:02 +0100 (BST) Received: from localhost (localhost [127.0.0.1]) by pichi.aluminati.org (Postfix) with ESMTP id B7E20161E48C; Sun, 9 Jun 2013 17:43:02 +0100 (BST) X-Virus-Scanned: Debian amavisd-new at aluminati.org Received: from pichi.aluminati.org ([127.0.0.1]) by localhost (pichi.aluminati.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id NbUjzYdSYtYT; Sun, 9 Jun 2013 17:43:01 +0100 (BST) Received: from serenity.lan (tg2.aluminati.org [10.0.7.178]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by pichi.aluminati.org (Postfix) with ESMTPSA id 5BDFF161E450; Sun, 9 Jun 2013 17:42:50 +0100 (BST) Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: On Sun, Jun 09, 2013 at 11:22:06AM -0500, Felipe Contreras wrote: > On Sun, Jun 9, 2013 at 11:02 AM, John Keeping wrote: > > 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.