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=-5.6 required=3.0 tests=AWL,BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,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 397631F89C for ; Tue, 17 Jan 2017 10:53:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751133AbdAQKxL (ORCPT ); Tue, 17 Jan 2017 05:53:11 -0500 Received: from mout.gmx.net ([212.227.17.22]:51721 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751108AbdAQKxG (ORCPT ); Tue, 17 Jan 2017 05:53:06 -0500 Received: from virtualbox ([37.24.141.236]) by mail.gmx.com (mrgmx101 [212.227.17.168]) with ESMTPSA (Nemesis) id 0Lwnem-1cVOKN08SG-016Ned; Tue, 17 Jan 2017 11:52:31 +0100 Date: Tue, 17 Jan 2017 11:52:29 +0100 (CET) From: Johannes Schindelin X-X-Sender: virtualbox@virtualbox To: Max Kirillov cc: Pat Thoyts , git@vger.kernel.org, Junio C Hamano Subject: Re: [BUG/RFC] Git Gui: GIT_DIR leaks to spawned Git Bash In-Reply-To: <20170116224022.GA8539@jessie.local> Message-ID: References: <20170116224022.GA8539@jessie.local> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Provags-ID: V03:K0:zGP70haMYzxNxsWy0tfmdTMk024Ti12eyDUbkxDjSd37WZou+yN fE1TLS35+3wQoe0dU6uwDtKUgBUCzq8tNSJP76pJ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ZKBrgtmYlGqK7cBlfCXh3ugdgOVP8HUWlTPZVFFi1HLgbeUclE5A3UvxqdKcln4wMf/+ XPCvJVnXPdMlbtgyIyH1NAb2Oixfxrw6EngeODXvMrcMAzS78SnipEyuotx4y6/MDUnru0Ve+ MrQYDi2zZhuJu6RMT8DnZFrfSPy2YNNPcxoNWISmsdygMEsxUApUTuVM6zFXz4cF+Q== Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Hi Max, On Tue, 17 Jan 2017, Max Kirillov wrote: > Apparently various GIT_* environment variables (most > interesting is GIT_DIR but AFAIR there were more) leak to > shell session launched from Git Gui's "Git Bash" menu item. Given that you call it from Git GUI, i.e. for a *specific* worktree, I do not think that this bug is *all* that critical. After all, you won't even notice unless you use the very same Git Bash to navigate to a *different* worktree. Having said that, if you have the time and energy to come up with a patch, I will definitely try my best to help you get it integrated. And having said *that*, I have to admit that I was unable to reproduce: GIT_DIR was set neither when starting Git GUI from the Start Menu (and then navigating to a previously-opened worktree because I am too lazy to navigate manually), nor when starting Git GUI from a Git CMD in a worktree via `git gui`. In both cases, the environment contained only the following variables whose name starts with "GIT_": $GIT_ASKPASS, $GIT_ASK_YESNO and $GIT_EXEC_PATH. I tested with Git for Windows v2.11.0(3), the latest offical version. Thanks, Johannes