From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#23769: 25.0.95; Mode Line breakage in vc-git Date: Fri, 17 Jun 2016 05:41:04 +0300 Message-ID: <55d7d4f1-321c-96a2-63da-8759bebffb89@yandex.ru> References: <87a8ioyq9o.fsf@russet.org.uk> <87wplr1z4z.fsf@russet.org.uk> <91e61a46-b3bb-c4d9-cb30-bbfa90135d69@yandex.ru> <877fdqkwki.fsf@russet.org.uk> <9856a1e4-be41-d781-bfbd-22bac360d18b@yandex.ru> <871t3y85oz.fsf@russet.org.uk> <6b6f147e-3b42-ccf5-92fd-0890d6942d4b@yandex.ru> <87vb19zilb.fsf@russet.org.uk> <36d92078-759f-94bd-d381-20d7727c9c85@yandex.ru> <7fc2c908-fbb2-0870-2370-9e340acccc1c@yandex.ru> <87oa70lsap.fsf@russet.org.uk> <9f2cdad5-2ca8-0956-3f60-05cf30012e17@yandex.ru> <87y464bwna.fsf@russet.org.uk> <87twgsbvsc.fsf@russet.org.uk> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1466131346 19567 80.91.229.3 (17 Jun 2016 02:42:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 17 Jun 2016 02:42:26 +0000 (UTC) Cc: 23769@debbugs.gnu.org, Noam Postavsky To: Phillip Lord Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jun 17 04:42:15 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1bDjjZ-0005QD-8l for geb-bug-gnu-emacs@m.gmane.org; Fri, 17 Jun 2016 04:42:13 +0200 Original-Received: from localhost ([::1]:53354 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bDjjY-0006eJ-9k for geb-bug-gnu-emacs@m.gmane.org; Thu, 16 Jun 2016 22:42:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40148) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bDjjT-0006dK-5k for bug-gnu-emacs@gnu.org; Thu, 16 Jun 2016 22:42:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bDjjO-0000LA-4u for bug-gnu-emacs@gnu.org; Thu, 16 Jun 2016 22:42:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:59543) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bDjjO-0000L6-1c for bug-gnu-emacs@gnu.org; Thu, 16 Jun 2016 22:42:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bDjjN-0006w8-Ku for bug-gnu-emacs@gnu.org; Thu, 16 Jun 2016 22:42:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 17 Jun 2016 02:42:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23769 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 23769-submit@debbugs.gnu.org id=B23769.146613127426605 (code B ref 23769); Fri, 17 Jun 2016 02:42:01 +0000 Original-Received: (at 23769) by debbugs.gnu.org; 17 Jun 2016 02:41:14 +0000 Original-Received: from localhost ([127.0.0.1]:43647 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bDjic-0006v3-Ic for submit@debbugs.gnu.org; Thu, 16 Jun 2016 22:41:14 -0400 Original-Received: from mail-wm0-f43.google.com ([74.125.82.43]:37732) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bDjia-0006uo-OO for 23769@debbugs.gnu.org; Thu, 16 Jun 2016 22:41:13 -0400 Original-Received: by mail-wm0-f43.google.com with SMTP id a66so81892170wme.0 for <23769@debbugs.gnu.org>; Thu, 16 Jun 2016 19:41:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=95CcipaoZenmSVV8WoW3QDYIgitOdd37uem7+ZwfOro=; b=tPvOCtd8vGxmPrmZSngt29ZKboRgkUF4bYRn2RkDsPYFfc5HfgXANyQjAXNxLw6uqG aN8k2G/gaGaXhd0FRHVn+toV4sx503mO3qo+vcLpUmracg8SvdfhxHU+Epc8uiftceAw x0CEmlZfEdaD2fOG2NgG98H8ReQBFdiqxdtTP/xNeNsrzCZIrcI3w0u91HSGCzFEr1Uu orsaFNYXN2JEcoYTg3OVL/HZ1uporxRs1+Ex4vtODgXesuI8em+aAKmfZByysjUpHH8C S2oXN42f6GxCmlpvlwIR/TbbVc/l3mTgZ12w9Wjr29gtR1GmtS6aGM+l8kKHIf+ZD1BU jDGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:subject:to:references:cc:from:message-id :date:user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=95CcipaoZenmSVV8WoW3QDYIgitOdd37uem7+ZwfOro=; b=mjTgo65l2ARivTCgsfdVhXQTM/KlR/WawrupdBVEyWWZvXz/2xM3WCko+TItW467Qk 2POKnqixX9KQJqBIe9Uk9DYmMMhEfZ66Kzr8KWV+aLz6V55YznUDNuRxzwjrIinwqGCv RYXdgS/MsChAZCOhMdsNiSZFclV/VigWBKPhaFFxTHh5O30G7GJ6nHrBu9mMHVrdMn4n 6Zl2qkxfVWSpbXTONOT1cQSn0hEgJ7xZWs/vGwgXq0gT3GQAY7dFnCEe1UMlCVr8je4c XTg9kjuL19OolPsnaEDElsDKUWLZWFqyq2erqywUwu5nq9hRI6IUvs76TyxP+tuX/a0q S3Qw== X-Gm-Message-State: ALyK8tIZLTw51ezoLrpSJGykXe/uImI/UNNsjtb+yJJjHDFL41wy4NHKwrQFJxdh9EvirQ== X-Received: by 10.28.150.81 with SMTP id y78mr17603278wmd.37.1466131267079; Thu, 16 Jun 2016 19:41:07 -0700 (PDT) Original-Received: from [192.168.1.2] ([185.105.173.135]) by smtp.googlemail.com with ESMTPSA id e8sm17628214wma.2.2016.06.16.19.41.05 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 16 Jun 2016 19:41:06 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2 In-Reply-To: <87twgsbvsc.fsf@russet.org.uk> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:119644 Archived-At: On 06/17/2016 01:42 AM, Phillip Lord wrote: > A problem as "GIT_DIR" on it's own, still breaks with my originally > reported error (at least when running my ert test I sent with my patch). > > Are you not getting this failure also? Sorry, I was only testing that the addition doesn't break anything in the normal case, otherwise relying on process-environment's docstring. There was a problem with the patch that not all vc-git code goes through vc-git--call (in fact, most don't), but even patching vc-git-command in a similar fashion doesn't change the behavior if Emacs was started with GIT_DIR=.git. Could this feature be actually broken? Or how does Git ignore the modification? "To use ‘process-environment’ to remove an environment variable, include only its name in the list, without "=VALUE"." diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el index f35c84d..a544a2e 100644 --- a/lisp/vc/vc-git.el +++ b/lisp/vc/vc-git.el @@ -1423,7 +1423,9 @@ vc-git-command (let ((coding-system-for-read (or coding-system-for-read vc-git-log-output-coding-system)) (coding-system-for-write - (or coding-system-for-write vc-git-commits-coding-system))) + (or coding-system-for-write vc-git-commits-coding-system)) + (process-environment process-environment)) + (push "GIT_DIR" process-environment) (apply 'vc-do-command (or buffer "*vc*") okstatus vc-git-program ;; http://debbugs.gnu.org/16897 (unless (and (not (cdr-safe file-or-list)) @@ -1451,6 +1453,7 @@ vc-git--call (coding-system-for-write (or coding-system-for-write vc-git-commits-coding-system)) (process-environment (cons "PAGER=" process-environment))) + (push "GIT_DIR" process-environment) (apply 'process-file vc-git-program nil buffer nil command args))) (defun vc-git--out-ok (command &rest args)