GNU bug report logs - #39285
28.0.50; vc-dir on gitdir results in error

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: "Mark A. Hershberger" <mah@HIDDEN>; dated Sat, 25 Jan 2020 21:56:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 39285 <at> debbugs.gnu.org:


Received: (at 39285) by debbugs.gnu.org; 27 Jan 2020 13:01:02 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jan 27 08:01:02 2020
Received: from localhost ([127.0.0.1]:57885 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iw40k-0007IE-4A
	for submit <at> debbugs.gnu.org; Mon, 27 Jan 2020 08:01:02 -0500
Received: from mail-lj1-f177.google.com ([209.85.208.177]:35866)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <raaahh@HIDDEN>) id 1iw40h-0007AY-6D
 for 39285 <at> debbugs.gnu.org; Mon, 27 Jan 2020 08:01:00 -0500
Received: by mail-lj1-f177.google.com with SMTP id r19so10579061ljg.3
 for <39285 <at> debbugs.gnu.org>; Mon, 27 Jan 2020 05:00:59 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=sender:subject:to:cc:references:from:message-id:date:user-agent
 :mime-version:in-reply-to:content-language:content-transfer-encoding;
 bh=WskH/99tn6pS7i+zyWCIGGC5pvdzNi0OgbV8mnaTLq4=;
 b=oqqx+G6CPwsr4RGxMlPBpFoWCfS3CgXywaMorU62UHkb0Mq0Vdw855k8FFZgFGro2f
 xTXRhCGyBFdST0EJ2iALlYhKieXXIOU9V7X61w59JqpIaBOpQN47DYohE/YlJHHCOp+x
 pfRYOxofxbmspRSBl77HpJBmpcWdpvBjIq4dtcdY5zb3mF+/xg4/KtNDwPjWChoFnUAs
 E6Phe2QJrPV2/KnbyXH9nOiRuWHb2/v0LZ2iLgnfsJpNm8+AoNGAztRpAV66lBxmzvaM
 psk3M/UC1w7aMsqgtTrHsAUBBwtBIW/jEwdzWT1beikeLqmwOVTOcH91siXwHl8iZXU0
 vpXw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:sender:subject:to:cc:references:from:message-id
 :date:user-agent:mime-version:in-reply-to:content-language
 :content-transfer-encoding;
 bh=WskH/99tn6pS7i+zyWCIGGC5pvdzNi0OgbV8mnaTLq4=;
 b=VnRu7fIJQpPdQtGvtyjEEQAtbCk4G2b7wXjZgGGubcQbph5LcoyUR3cGPwW6yfuKCq
 qE3C7mbHf9gYhpKV+sAhOjURhM2Cq8IbcQKZynPXifQuv50CCvdSsWDMMz638MPfpn/F
 ZPUTdXvxoCjPTu6jCSWOF7k6CBZiFzL/eDce32jz9Qb4rNGbuSLQHs/YdU8al1ijCvh5
 7qJFtOLhGVkqqCynXG1luZKIlueF839qmIU9d1K0qMhLU5xlOIR1CqNszx8OQlx3tXXD
 mA7cJ49VNZKtYnWDK/esX1/KpXYgSih65c1nzfIQckVonE3EkPCuM/3cpALVEGrUdgKn
 Rhpw==
X-Gm-Message-State: APjAAAURq/mnUm1yqvN3/cSo1RmaR+Bbey+mBfWIymU2qKVZIdoO+3+7
 bMeYHFKuzY6grdbsNhOACpw=
X-Google-Smtp-Source: APXvYqw/qRbkwYN/jpGbr/f4JLkEZzmVgr8A0iMiGeGgszLI8G1y9orXaMUM9iEdnpCjInLT3peQOg==
X-Received: by 2002:a2e:9d0f:: with SMTP id t15mr10102123lji.171.1580130053054; 
 Mon, 27 Jan 2020 05:00:53 -0800 (PST)
Received: from [192.168.1.142] ([178.252.127.239])
 by smtp.googlemail.com with ESMTPSA id b64sm8102045lfg.7.2020.01.27.05.00.51
 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Mon, 27 Jan 2020 05:00:52 -0800 (PST)
Subject: Re: bug#39285: 28.0.50; vc-dir on gitdir results in error
To: Robert Pluim <rpluim@HIDDEN>
References: <87lfpvqjzq.fsf@HIDDEN>
 <eca2d50b-268f-61e6-4796-f1b28c75dcb1@HIDDEN> <m2k15d887z.fsf@HIDDEN>
From: Dmitry Gutov <dgutov@HIDDEN>
Message-ID: <bf138511-ea13-e441-f365-fdccf62071fd@HIDDEN>
Date: Mon, 27 Jan 2020 16:00:51 +0300
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101
 Thunderbird/60.9.0
MIME-Version: 1.0
In-Reply-To: <m2k15d887z.fsf@HIDDEN>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Spam-Score: 2.0 (++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview:  On 27.01.2020 14:11, Robert Pluim wrote: > Shouldn't 'vc-dir'
 have errored out before, since the ".git" directory > is not vc-controlled?
 Not... really. I mean, we can add that error, but it doesn't error out a)
 because we consider any directory inside a working dir to belong to it, b)
 because of some defensive programming. 
 Content analysis details:   (2.0 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 0.0 FREEMAIL_FROM          Sender email is commonly abused enduser mail
 provider (raaahh[at]gmail.com)
 -0.0 SPF_PASS               SPF: sender matches SPF record
 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level
 mail domains are different
 -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at https://www.dnswl.org/,
 no trust [209.85.208.177 listed in list.dnswl.org]
 -0.0 RCVD_IN_MSPIKE_H2      RBL: Average reputation (+2)
 [209.85.208.177 listed in wl.mailspike.net]
 1.5 RCVD_IN_SORBS_WEB      RBL: SORBS: sender is an abusable web server
 [178.252.127.239 listed in dnsbl.sorbs.net]
 0.2 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and
 EnvelopeFrom freemail headers are different
X-Debbugs-Envelope-To: 39285
Cc: 39285 <at> debbugs.gnu.org, "Mark A. Hershberger" <mah@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 1.0 (+)

On 27.01.2020 14:11, Robert Pluim wrote:
> Shouldn't 'vc-dir' have errored out before, since the ".git" directory
> is not vc-controlled?

Not... really. I mean, we can add that error, but it doesn't error out 
a) because we consider any directory inside a working dir to belong to 
it, b) because of some defensive programming.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#39285; Package emacs. Full text available.

Message received at 39285 <at> debbugs.gnu.org:


Received: (at 39285) by debbugs.gnu.org; 27 Jan 2020 11:11:38 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jan 27 06:11:38 2020
Received: from localhost ([127.0.0.1]:57838 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iw2Is-0001iR-Ds
	for submit <at> debbugs.gnu.org; Mon, 27 Jan 2020 06:11:38 -0500
Received: from mail-wm1-f65.google.com ([209.85.128.65]:56058)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rpluim@HIDDEN>) id 1iw2Ip-0001i8-SV
 for 39285 <at> debbugs.gnu.org; Mon, 27 Jan 2020 06:11:36 -0500
Received: by mail-wm1-f65.google.com with SMTP id q9so6351389wmj.5
 for <39285 <at> debbugs.gnu.org>; Mon, 27 Jan 2020 03:11:35 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=from:to:cc:subject:references:date:in-reply-to:message-id
 :mime-version; bh=LMluW09MSOn6I1Rx8JSemSkkxCLMtGowYBkjds+ZmWM=;
 b=SJcYFOehv4crCMrn0fQyWLwJuC857H+kAm1SqZ8KUPORzaYq15/U7bWDzW/+opaS2X
 Wjocsoptyixcnvhb4Srb3zTt5KFEBtEQlHLydzxixq5fNRpuUg2ttpSTO4VgHPDtxSWa
 KNpUAJ+r8cJX2DV9MmTCySW7V7AVFJWaP4Jr6eVTaat68vX22chH985lLHA0Im8P7RkM
 rYzDjFdq0nt7wbYOq/7f+AOE5QUyckJf5SdSUrsoey5eF5HD0hR06TyJ3EK89TaBuDRD
 crhllBNDqFXELoZzzAF4uEf7XeGasBp1eeAeKjIOmvjUQtlfPoTB0/HJED/KemR0yun0
 +lnQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to
 :message-id:mime-version;
 bh=LMluW09MSOn6I1Rx8JSemSkkxCLMtGowYBkjds+ZmWM=;
 b=HmWeGIeQAlvQOXeP+dX/9+svwrzqf88e65xRm1GNfWJNEHTVodohEi/Q286cy5/vLB
 sRTheXFsxgSupmnki/9F6CtAEZhCW01UeHH84CwpnUwpJtfyZgHaRwq0POVINwU3YKMD
 s3ye28qn+nyvPJuZ1d3QzRiDWQ87q7zbp+0vRJANSP+Azc+fZUYkWh601TyAc6A5Vlbo
 5E2LZWj8+eta8uruJ9gy2bsJTPmvG66ydNXCMzMEn2cw8z43o3VjbjBHADm0uDg85vfH
 SEFUEP5BGrzjPSr/uIF8D9+IQfzutQHD6zmtNm4dKt64TyEjB0mQ9vmmvENtLunr5uWc
 J+6w==
X-Gm-Message-State: APjAAAU30s1nXEtc47W0Am7hqg2ytrvAgncnE+TBNYGOS0QMPsp5F3gL
 DU/BGqSMt4OsOdPlnCK9xEuBeG3V
X-Google-Smtp-Source: APXvYqyaNwoRil/tl+RFZpOvYYH7ENKZijXe6DtclvpkT2EH3a4p6YEqh9Qalkt9GfHdXF5TaZJy9g==
X-Received: by 2002:a05:600c:242:: with SMTP id 2mr11208414wmj.2.1580123489818; 
 Mon, 27 Jan 2020 03:11:29 -0800 (PST)
Received: from rpluim-mac ([2a01:e34:ecfc:a860:1525:4cba:5b05:6226])
 by smtp.gmail.com with ESMTPSA id b10sm21872553wrt.90.2020.01.27.03.11.28
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Mon, 27 Jan 2020 03:11:29 -0800 (PST)
From: Robert Pluim <rpluim@HIDDEN>
To: Dmitry Gutov <dgutov@HIDDEN>
Subject: Re: bug#39285: 28.0.50; vc-dir on gitdir results in error
References: <87lfpvqjzq.fsf@HIDDEN>
 <eca2d50b-268f-61e6-4796-f1b28c75dcb1@HIDDEN>
Date: Mon, 27 Jan 2020 12:11:28 +0100
In-Reply-To: <eca2d50b-268f-61e6-4796-f1b28c75dcb1@HIDDEN> (Dmitry Gutov's
 message of "Mon, 27 Jan 2020 08:49:20 +0300")
Message-ID: <m2k15d887z.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 39285
Cc: 39285 <at> debbugs.gnu.org, "Mark A. Hershberger" <mah@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

>>>>> On Mon, 27 Jan 2020 08:49:20 +0300, Dmitry Gutov <dgutov@HIDDEN> said:

    Dmitry> Hi there!
    Dmitry> On 26.01.2020 0:55, Mark A. Hershberger wrote:
    >> While trying projectile's "Browse dirty projects", I hit an error.
    >> I
    >> was able to reproduce this error using
    >> (vc-dir "/home/mah/work/code/emacs/.git/")
    >> or any other git dir.

    Dmitry> What kind of directory is this?

    Dmitry> Normally, .git is a utility directory which is not considered part of
    Dmitry> the work tree. So most git commands fail inside it.

Shouldn't 'vc-dir' have errored out before, since the ".git" directory
is not vc-controlled?

    Dmitry> I suppose vc-git-stash-list could handle this better, but you still
    Dmitry> won't get anything better than a misleadingly empty VC-Dir buffer. The 
    Dmitry> current behavior might even be better in that regard.

    Dmitry> This patch would make it shut up, though:

    Dmitry> diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el
    Dmitry> index 61e6c642d1..9b3f3c6545 100644
    Dmitry> --- a/lisp/vc/vc-git.el
    Dmitry> +++ b/lisp/vc/vc-git.el
    Dmitry> @@ -1688,12 +1688,14 @@ vc-git-stash-snapshot
    Dmitry>    (vc-resynch-buffer (vc-git-root default-directory) t t))

    Dmitry>  (defun vc-git-stash-list ()
    Dmitry> -  (delete
    Dmitry> -   ""
    Dmitry> -   (split-string
    Dmitry> -    (replace-regexp-in-string
    Dmitry> -     "^stash@" "             " (vc-git--run-command-string nil
    Dmitry>       "stash" "list"))
    Dmitry> -    "\n")))
    Dmitry> +  (let ((out (vc-git--run-command-string nil "stash" "list")))
    Dmitry> +    (when out
    Dmitry> +      (delete
    Dmitry> +       ""
    Dmitry> +       (split-string
    Dmitry> +        (replace-regexp-in-string
    Dmitry> +         "^stash@" "             " out)
    Dmitry> +        "\n")))))

    Dmitry>  (defun vc-git-stash-get-at-point (point)
    Dmitry>    (save-excursion

LGTM.

Robert




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#39285; Package emacs. Full text available.

Message received at 39285 <at> debbugs.gnu.org:


Received: (at 39285) by debbugs.gnu.org; 27 Jan 2020 05:49:31 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jan 27 00:49:31 2020
Received: from localhost ([127.0.0.1]:57736 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ivxH9-0002N7-F0
	for submit <at> debbugs.gnu.org; Mon, 27 Jan 2020 00:49:31 -0500
Received: from mail-lj1-f193.google.com ([209.85.208.193]:46814)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <raaahh@HIDDEN>) id 1ivxH7-0002Mu-4x
 for 39285 <at> debbugs.gnu.org; Mon, 27 Jan 2020 00:49:30 -0500
Received: by mail-lj1-f193.google.com with SMTP id x14so6924650ljd.13
 for <39285 <at> debbugs.gnu.org>; Sun, 26 Jan 2020 21:49:29 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=sender:subject:to:references:from:message-id:date:user-agent
 :mime-version:in-reply-to:content-language:content-transfer-encoding;
 bh=u0bLjqfHTCs9QLNOjNiCYX3ab9dHlzKfrsauIfHOHF4=;
 b=KoNzCp333WBzxbxGbwqjGeLuFKNq5uOGwjmeWnMbbtH2bqAEZL4ib/UnEOHC8+JP3b
 iBca9O/0grH+7/YrpZg8oRoLkU9TZnRNDWEOZwfITcvkGYjUfeWFBBKe+EaGmZ3xgfjo
 Xcvc0OHIpQfKwsrbBf8BOuhcLCK6r7MDD/iPQa03wXeoo5emNcvI44RvCeZGngHM5yvB
 2kTuuoGn3XSwGBOKcZQU/66J5K/wv+qngLggQjPo2bVSWSk72jrg1uSDmUrC4y83KRdS
 JgKcsj3LUnyi5Dr3aBfqiXVwFkE530WwEV3I2L9yeJe18Qmcje830abdKCkJLUtoiscT
 vjYA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:sender:subject:to:references:from:message-id
 :date:user-agent:mime-version:in-reply-to:content-language
 :content-transfer-encoding;
 bh=u0bLjqfHTCs9QLNOjNiCYX3ab9dHlzKfrsauIfHOHF4=;
 b=GKBNS2LQRbWgLvjn/eeWzlN/ZVxXtILeb7X7sBQUQXHAmambeC11hGSY6lGvalxgEV
 QBbrnOJiXUCUWESSdUkOtUNWZJ5Wj5A7OpyAr/8wy9BqlGz12Ht+W0cJ3Fp4f4CHJFWJ
 3tWnE4orqkc8faEhcaFIqas30vzTjsO25sswZjFIGaso0fXu90a3wdEQemWTPJwyc2wS
 F4GuoLZOuoZNiFYbl1vt/D5mmcr246iQIRKrVY7zvtyNcCV/7REtmdM6Pa420vzbJMLJ
 +C0g3/xf0DhmfYRbJErZzz+OEg0EeIs45zw9o4Ay09BPQ9vA8wsk6dpQzQ9otVHMN0eA
 Ua0g==
X-Gm-Message-State: APjAAAUnjR/W/f5blw46IWeBcLCdSenENw/1T79UvhPS5cFjETgtoYRE
 jfQSq6QwFEixcMHxhq1YFEtDWJDiSLnM9w==
X-Google-Smtp-Source: APXvYqwKsXT68DnZbRu44kBeVWQYzgvkFfAh1Vx9efE93mwMexR6DDkAIUQb2Lz6Cwcy4GtKs17o1A==
X-Received: by 2002:a2e:58c:: with SMTP id 134mr9191780ljf.12.1580104162781;
 Sun, 26 Jan 2020 21:49:22 -0800 (PST)
Received: from [172.30.19.30] (176-93-8-18.bb.dnainternet.fi. [176.93.8.18])
 by smtp.googlemail.com with ESMTPSA id q26sm7396782lfp.85.2020.01.26.21.49.21
 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Sun, 26 Jan 2020 21:49:22 -0800 (PST)
Subject: Re: bug#39285: 28.0.50; vc-dir on gitdir results in error
To: "Mark A. Hershberger" <mah@HIDDEN>, 39285 <at> debbugs.gnu.org
References: <87lfpvqjzq.fsf@HIDDEN>
From: Dmitry Gutov <dgutov@HIDDEN>
Message-ID: <eca2d50b-268f-61e6-4796-f1b28c75dcb1@HIDDEN>
Date: Mon, 27 Jan 2020 08:49:20 +0300
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101
 Thunderbird/60.9.0
MIME-Version: 1.0
In-Reply-To: <87lfpvqjzq.fsf@HIDDEN>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.5 (/)
X-Debbugs-Envelope-To: 39285
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.5 (/)

Hi there!

On 26.01.2020 0:55, Mark A. Hershberger wrote:
> 
> While trying projectile's "Browse dirty projects", I hit an error.  I
> was able to reproduce this error using
> 
>      (vc-dir "/home/mah/work/code/emacs/.git/")
> 
> or any other git dir.

What kind of directory is this?

Normally, .git is a utility directory which is not considered part of 
the work tree. So most git commands fail inside it.

I suppose vc-git-stash-list could handle this better, but you still 
won't get anything better than a misleadingly empty VC-Dir buffer. The 
current behavior might even be better in that regard.

This patch would make it shut up, though:

diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el
index 61e6c642d1..9b3f3c6545 100644
--- a/lisp/vc/vc-git.el
+++ b/lisp/vc/vc-git.el
@@ -1688,12 +1688,14 @@ vc-git-stash-snapshot
    (vc-resynch-buffer (vc-git-root default-directory) t t))

  (defun vc-git-stash-list ()
-  (delete
-   ""
-   (split-string
-    (replace-regexp-in-string
-     "^stash@" "             " (vc-git--run-command-string nil "stash" 
"list"))
-    "\n")))
+  (let ((out (vc-git--run-command-string nil "stash" "list")))
+    (when out
+      (delete
+       ""
+       (split-string
+        (replace-regexp-in-string
+         "^stash@" "             " out)
+        "\n")))))

  (defun vc-git-stash-get-at-point (point)
    (save-excursion




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#39285; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 25 Jan 2020 21:55:40 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Jan 25 16:55:40 2020
Received: from localhost ([127.0.0.1]:56415 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ivTP2-0006RU-3f
	for submit <at> debbugs.gnu.org; Sat, 25 Jan 2020 16:55:40 -0500
Received: from lists.gnu.org ([209.51.188.17]:43390)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <mah@HIDDEN>) id 1ivTP0-0006RN-UN
 for submit <at> debbugs.gnu.org; Sat, 25 Jan 2020 16:55:39 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10]:39258)
 by lists.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <mah@HIDDEN>) id 1ivTOz-0006Q2-ES
 for bug-gnu-emacs@HIDDEN; Sat, 25 Jan 2020 16:55:38 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,RCVD_IN_DNSWL_NONE,
 URIBL_BLOCKED autolearn=disabled version=3.3.2
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <mah@HIDDEN>) id 1ivTOx-00051K-JS
 for bug-gnu-emacs@HIDDEN; Sat, 25 Jan 2020 16:55:37 -0500
Received: from nospam.nichework.com ([206.71.169.33]:49772)
 by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <mah@HIDDEN>) id 1ivTOx-0004ei-BR
 for bug-gnu-emacs@HIDDEN; Sat, 25 Jan 2020 16:55:35 -0500
Received: from localhost (localhost.localdmain [127.0.0.1])
 by nospam.nichework.com (Postfix) with ESMTP id 14BF0B0031
 for <bug-gnu-emacs@HIDDEN>; Sat, 25 Jan 2020 16:54:14 -0500 (EST)
X-Virus-Scanned: Debian amavisd-new at nospam.nichework.com
Received: from nospam.nichework.com ([127.0.0.1])
 by localhost (nospam.nichework.com [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id xKKQZuAndIGl for <bug-gnu-emacs@HIDDEN>;
 Sat, 25 Jan 2020 16:54:13 -0500 (EST)
Received: from mail.nichework.com (mail.nichework.com [108.161.151.158])
 (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
 (No client certificate requested)
 by nospam.nichework.com (Postfix) with ESMTPS id 7F6A1B0030
 for <bug-gnu-emacs@HIDDEN>; Sat, 25 Jan 2020 16:54:13 -0500 (EST)
Received: from mail.nichework.com (localhost.localdomain [127.0.0.1])
 by mail.nichework.com (Postfix) with ESMTPS id DB6C14E1C21
 for <bug-gnu-emacs@HIDDEN>; Sat, 25 Jan 2020 13:55:30 -0800 (PST)
Received: from localhost (localhost.localdomain [127.0.0.1])
 by mail.nichework.com (Postfix) with ESMTP id CE89E4E0D31
 for <bug-gnu-emacs@HIDDEN>; Sat, 25 Jan 2020 13:55:30 -0800 (PST)
X-Virus-Scanned: amavisd-new at mail.nichework.com
Received: from mail.nichework.com ([127.0.0.1])
 by localhost (mail.nichework.com [127.0.0.1]) (amavisd-new, port 10026)
 with ESMTP id f74vGg-AVwNO for <bug-gnu-emacs@HIDDEN>;
 Sat, 25 Jan 2020 13:55:30 -0800 (PST)
Received: from silk.everybody.org (unknown [24.115.224.241])
 by mail.nichework.com (Postfix) with ESMTPSA id 76A944E0799
 for <bug-gnu-emacs@HIDDEN>; Sat, 25 Jan 2020 13:55:30 -0800 (PST)
From: "Mark A. Hershberger" <mah@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 28.0.50; vc-dir on gitdir results in error
Date: Sat, 25 Jan 2020 16:55:21 -0500
Message-ID: <87lfpvqjzq.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x
X-Received-From: 206.71.169.33
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)


While trying projectile's "Browse dirty projects", I hit an error.  I
was able to reproduce this error using

    (vc-dir "/home/mah/work/code/emacs/.git/")

or any other git dir.

Here is the backtrace:

  substring(nil 0 0)
  replace-regexp-in-string("^stash@" "             " nil)
  vc-git-stash-list()
  vc-git-dir-extra-headers("/home/mah/work/code/emacs/.git/")
  apply(vc-git-dir-extra-headers "/home/mah/work/code/emacs/.git/")
  vc-call-backend(Git dir-extra-headers "/home/mah/work/code/emacs/.git/")
  vc-dir-headers(Git "/home/mah/work/code/emacs/.git/")
  vc-dir-refresh()
  vc-dir-mode()
  vc-dir("/home/mah/work/code/emacs/.git/")
  eval((vc-dir "/home/mah/work/code/emacs/.git/") t)
  eval-expression((vc-dir "/home/mah/work/code/emacs/.git/") nil nil 127)
  funcall-interactively(eval-expression (vc-dir "/home/mah/work/code/emacs/.git/") nil nil 127)
  call-interactively(eval-expression nil nil)
  command-execute(eval-expression)


In GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.5, cairo version 1.16.0)
 of 2020-01-24 built on silk
Repository revision: ff630b56939541752097e5cc87c3db1de68d4c5f
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12004000
System Description: Debian GNU/Linux 10 (buster)

Recent messages:
Entering debugger...
Mark set
next-line: End of buffer [10 times]
Saved text from "  substring(nil 0 0)
  replace-regexp-in"
Back to top level
Quit
Making completion list...
user-error: Beginning of history; no preceding item
user-error: End of history; no default available [2 times]

Configured using:
 'configure --with-modules --with-xwidgets --with-gconf --with-cairo
 --with-imagemagick'

Configured features:
XPM JPEG TIFF GIF PNG RSVG CAIRO IMAGEMAGICK SOUND GPM DBUS GCONF
GSETTINGS GLIB NOTIFY INOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE
HARFBUZZ M17N_FLT LIBOTF ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM
MODULES THREADS XWIDGETS LIBSYSTEMD JSON PDUMPER LCMS2 GMP

Important settings:
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: utf-8-unix

Major mode: VC dir

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  buffer-read-only: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs
format-spec rfc822 mml mml-sec password-cache epa derived epg epg-config
gnus-util rmail rmail-loaddefs text-property-search time-date subr-x
mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils
mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr
mail-utils thingatpt help-fns radix-tree cl-print debug backtrace
help-mode find-func vc-git diff-mode easymenu easy-mmode vc-bzr vc-src
vc-sccs vc-svn vc-cvs vc-rcs vc-dir seq byte-opt gv bytecomp
byte-compile cconv ewoc vc cl-loaddefs cl-lib vc-dispatcher tooltip
eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel
term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image
regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode
lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch
timer select scroll-bar mouse jit-lock font-lock syntax facemenu
font-core term/tty-colors frame minibuffer cl-generic cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european
ethiopic indian cyrillic chinese composite charscript charprop
case-table epa-hook jka-cmpr-hook help simple abbrev obarray
cl-preloaded nadvice loaddefs button faces cus-face macroexp files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote threads dbusbind
inotify lcms2 dynamic-setting system-font-setting font-render-setting
xwidget-internal cairo move-toolbar gtk x-toolkit x multi-tty
make-network-process emacs)

Memory information:
((conses 16 63534 5598)
 (symbols 48 7744 1)
 (strings 32 22875 1739)
 (string-bytes 1 697483)
 (vectors 16 12421)
 (vector-slots 8 155309 11316)
 (floats 8 27 73)
 (intervals 56 347 0)
 (buffers 1000 16))




Acknowledgement sent to "Mark A. Hershberger" <mah@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#39285; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 27 Jan 2020 13:15:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.