From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-4.7 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD shortcircuit=no autolearn=ham autolearn_force=no version=3.4.0 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by dcvr.yhbt.net (Postfix) with ESMTP id 38DF81F859 for ; Wed, 31 Aug 2016 18:45:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754178AbcHaSpP (ORCPT ); Wed, 31 Aug 2016 14:45:15 -0400 Received: from pb-smtp1.pobox.com ([64.147.108.70]:54523 "EHLO sasl.smtp.pobox.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754031AbcHaSpO (ORCPT ); Wed, 31 Aug 2016 14:45:14 -0400 Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by pb-smtp1.pobox.com (Postfix) with ESMTP id 0E2B13B0E7; Wed, 31 Aug 2016 14:44:49 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=sasl; bh=OoIFJBbkA4LzjHR4rVvdRNkigcM=; b=W+ZFYI 2GrUt0XqsUBeN8JM1sCyFO+WRuSsNIk1L5BiG+Z9QXXv5t8phBVcc7Yr+wtdEx7D bPKTwmtQhT1T88g2omuuF2JJuHS3sNwLsDmbS+8nWsFwIx9Bz7JL3XhXLlRZtwxr nk6naThdKAomMDmDv38igW6rr2Z3O0LnI+HaQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; q=dns; s=sasl; b=E5frVLVQxVkwWkzFqfsi5QAG6qj2jS5X D5+jCSTXot2JEpcVP2V9MTI/g4VuuweX9ZqDeMeP9L1qedIBerqRbhf4EavuXxyb NY9PM8hx7NezyHSCgWHKEtBwmo0KBacCcthoVCZjgIZNa2t8wgFZW3FGCgA1S+L3 ZMJPBhQJq/8= Received: from pb-smtp1.nyi.icgroup.com (unknown [127.0.0.1]) by pb-smtp1.pobox.com (Postfix) with ESMTP id 0666D3B0E6; Wed, 31 Aug 2016 14:44:49 -0400 (EDT) Received: from pobox.com (unknown [104.132.0.95]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by pb-smtp1.pobox.com (Postfix) with ESMTPSA id 814923B0E5; Wed, 31 Aug 2016 14:44:48 -0400 (EDT) From: Junio C Hamano To: Uma Srinivasan Cc: Jacob Keller , Git Mailing List , Jens Lehmann , Heiko Voigt , Stefan Beller Subject: Re: git submodules implementation question References: Date: Wed, 31 Aug 2016 11:44:46 -0700 In-Reply-To: (Uma Srinivasan's message of "Wed, 31 Aug 2016 11:40:03 -0700") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Pobox-Relay-ID: FE7C0B54-6FAA-11E6-9F4D-F7BB12518317-77302942!pb-smtp1.pobox.com Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Uma Srinivasan writes: > diff --git a/submodule.c b/submodule.c > index 5a62aa2..23443a7 100644 > --- a/submodule.c > +++ b/submodule.c > @@ -960,6 +960,9 @@ unsigned is_submodule_modified(const char *path, > int ignore_untracked) > return 0; > > } > + /* stuff submodule git dir into env var */ > + set_git_dir(git_dir); We want to affect only the process we are going to spawn to work inside the submodule, not ourselves, which is what this call does; this does not sound like a good idea.