From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 06 08:59:36 2020 Received: (at submit) by debbugs.gnu.org; 6 Feb 2020 13:59:36 +0000 Received: from localhost ([127.0.0.1]:47148 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1izhgu-0000WH-9U for submit@debbugs.gnu.org; Thu, 06 Feb 2020 08:59:36 -0500 Received: from lists.gnu.org ([209.51.188.17]:44366) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1izhgs-0000W8-BA for submit@debbugs.gnu.org; Thu, 06 Feb 2020 08:59:34 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:41056) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1izhgr-0008UH-1q for bug-gnu-emacs@gnu.org; Thu, 06 Feb 2020 08:59:34 -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.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW,SPOOFED_FREEMAIL,URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1izhgp-0000uT-VL for bug-gnu-emacs@gnu.org; Thu, 06 Feb 2020 08:59:32 -0500 Received: from mout.gmx.net ([212.227.15.18]:36809) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1izhgp-0000jL-HL for bug-gnu-emacs@gnu.org; Thu, 06 Feb 2020 08:59:31 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1580997567; bh=TUC9q7vK15q64H+hCo7g0QKVkOT42e6o/Cf0Y7Y5B38=; h=X-UI-Sender-Class:To:From:Subject:Date; b=MfSNyvHIo7W6EYoS8XYBqOYyh9WD8jj4ulCASTrjmEIPI7GZN/wtBgyJJW/aPjk6S topNEJkcJTb84cZufZ0NApd0Wu5Uebsvk8Kbksz0t/sp2Orss5YeuYTiftRuCliLKJ 3vg2RVS5Cd0BTeEW7aP7DYX4vonQtGGYI1ueq9oo= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from sheckley.simul.de ([87.160.210.52]) by mail.gmx.com (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MEUzA-1ikrQq3lu6-00G0w2 for ; Thu, 06 Feb 2020 14:59:26 +0100 Received: from [127.0.0.1] (sheckley.simul.de [127.0.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by sheckley.simul.de (Postfix) with ESMTPSA id 7565519431C9 for ; Thu, 6 Feb 2020 14:59:26 +0100 (CET) To: Emacs Bugs From: Wolfgang Scherer Subject: [PATCH] vc-git-state fails for filenames with wildcards Openpgp: preference=signencrypt Autocrypt: addr=Wolfgang.Scherer@gmx.de; prefer-encrypt=mutual; keydata= xsDiBEb46IgRBACMHOAb1KNo1Ylk+ebri+4R+bG4tyKlqBlrpv8D9/ZwRdXSGt+0DyCHoaAd 7KW7noHapLe87DunABOjKG4nqTGv+dRiWuUBlp3I4aYRFDVa3Da+XnIYkMHKqhK59VEHQCdp Km42nuLS7TS+n99at9YwzTG6VBdOlBKTlRFngOjVLwCg1RGXJ6X3EjS1FKCQeXziURVpWlkD /2zY6Ayhxi62TS84VjikXrrmjXykAAaAmMVEyKKYb9L5pGlqiZz9g/K9xw1EUoZTYuaufquD v4rAGR58K/3V4CYfJLEeshMWiaXHvMmlxMznlG16/um4MvmR8B3r+cx0nOPK1JBdD2qrkNnF Mw8FB+zouLFB4Gt2IUC5IlOmZ8OQA/4qdU53CItzWsCr9Nux4L0qUlRweSmCnV8xGQ2wP5XI MawIQxxREvSrsYDG8cNnYETMg4iQFfIktwAoxCJvuFAwIB6ZxHGF4FcEZm64CXc2u7CmFLqt rVhXhIfMz9oEYC+HhGczGamn9ofbGTFd2hJEtPcQgWNR4f7+aKknmi2+OM0fV29sZmdhbmcg U2NoZXJlciA8d3NAc3ctYW10LndzPsJhBBMRAgAhBQJYmz3YAhsjBQsJCAcCBhUICQoLAgQW AgMBAh4BAheAAAoJEIUCr3Gr112VZZoAoLTBSTp1qGuNhLdXY04iaWCMYmHCAJ4kHPtQ6nTw kEq9qCHgVgXDaY7wjs7ATQRG+OiIEAQAhi0wjcxvA4tychg2NQuwBIf9LX/46l+74+QbewCn a4a+mw/9s5KYqLGtYMuu3/KYq9yBd53OYc7LWTLMxsGOIATSOQRhdCKYW1AanupYrC/bKNW/ 8i2QEXc7LIeYiaII0TkVdQTVZxrg9kKLQ+Vf6z04Lbfv91sVCkHKI9jxgVMAAwUD/0mkDeN0 tllPH+NOjbkkqlOj6UOwzwIYgXmALhuAEFGXVLM2HfRV9TtJa2OoGZiuhyGXat3Jl9QK9NNv d/J4HSal93ZHWstPU4YIRc5uhJ1eeWwKsfTmPvbZXMKMkh+hBBJ39SZnmxfoeUzkK0EQNE2p PZDyjAlz03qOx6D0DHnZwkkEGBECAAkFAkb46IgCGwwACgkQhQKvcavXXZU8PwCdGmUH5mbh dsLYyx7qthe4hOWnW54AoJQMfmHP4uUI6ji8VkdlvO8LKtLP Message-ID: Date: Thu, 6 Feb 2020 14:59:26 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.1 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------27A05B47FDAE0E731A585AE8" Content-Language: de-DE X-Provags-ID: V03:K1:fqbQYM+9g2vmCbm/iYzw3mxoliuWRP6XKfaRUGszsFATLJ8ZL4Q cPwhipKOAtxnILScdgs475lc2Utxey7Z8T6SoFFVJaRdnbjSaeYHuZDn9MA8fE9oCEim3+m qhUOuojBU/U9ALSa0MJMwEkJn3SrZn/HGUKDLyiyjbm5qcg+QJ8GQTgeUIfEdEy3JB8/tE4 wQFOYl9+6/+EQOKIF63jA== X-UI-Out-Filterresults: notjunk:1;V03:K0:7ZwZDgUGiZM=:sFGLNx/UZY29pYGbS9o59/ mPVQb71jf3SIrDPxYzdx1EQmTLXsvEu2hIWPgAlhfBZ3ZUQQHJfrpQfDWwZQpLxwUdjq5YG6e eBcLpsd3tYT2njlCfjH8/Q5bPj0+kHKTcEwiwHSUa6b05uuFNhXZuNPMTRRmtRK1vOuHVHQ3t vRkndR+GMXm6cZlZYZr7KYkTi/MzKjirtJZzNZbpr4795yp/a+0H2mUO7d1+bg/xEYFUc3iwd f4unMC+NUPk/QYlHKYK3aTvviGSMTLUnsIhs+UrSswCIuM2BPld/leUKV1N3sung7NhhTP/LD GF0rLYjTpvXIzoA6SxTnV0f8RuDBMS40RBwKOKV88oWWUDtDdYDUd/TtZNqCTucUsff6rXl1m R6H8o9UF6L25M098gvridiWCIr56TAo5TrK7fqmt9SHm6dKcBS6rUs8lQIR+ZWbVrZ86nmbIX rlwQjRd0ojW+cfF8qyls9g4w4odCWsfLY2oZCHqpdcxBjaVLwiiC9EduvDUunAJAcW2DZhvrY qI78MXmS4OeKfkYkkFlW5QnV/WzjYNLPLfc+X1wx97ftRKek8B0WFxLfEahP/du4Gvd8es9fv oRjpSH7+bkvNwySpQuXskUz+o68omn52Fv/QLkPbjLzbpPavggcTJK/U/dJjgFj92K7y/tlmL jXJ/rYoqMEkgPYSMvJVt+gRUOKiLFwmeCHzaHiasiUvHXh6JP4/a9Z2Bu6jMHMMFb1SkKPfT7 96LoPvWZy8FQvQqyznl2afxrpihrRTpSxteYSjrVqJDuh5r6KqZ6eI/eZRpZP+XpAgzX6mQxd nzAunbBSZpApL587Mcngnmitts94wTqEBj0vfwF34Yt6YmzYRJiQJNjFJkFVqe2NKlibFg6aj AcgMDmEFn0VgEssXsEfp8I4HzDVWGXp9tQjau/UC5M2KVWnnL++EIDRgIXSYA8wmvy9KKU0NI gjm+mjUtpDnrEsh/SJ8mCnduSelfJTqFCZzwldYwu+23Nisea0mSy84jKTokMAj7EdZgpNqQ9 rp64VzJF5k8jDW7gC6dhCUh3UdguoxFu/N8usnKch0Q+qrvSvKg1Oce/ZQi/PH2UJJGyVjvhp tuAzc0LSLBUkEAZtwljBNgbgdnzx38Hwj6HkpeYzbeXmm8JKgaElC1FApfnmifzFZsQwb1GJ2 7a8LU+WsYzy8ug00PBVxJb2F1JjTf5SRI8ajYdQsy0FqxfxdR+olSXgRsSKUXT/ct6nGtitM6 EY/TaVjV969SYeD/5 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.15.18 X-Spam-Score: 2.2 (++) 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: When a filename contains shell wildcard characters matching one or more files, e.g. `test[56].xx` matching both `test5.xx` and `test6.xx`:   -rw-r--r--  1 ws ws    0 Feb  6 08:51 test[56].xx   -rw-r--r--  1 ws ws    0 Feb  6 08:51 test5.xx   -rw-r--r--  1 ws ws    0 Feb  6 08:51 test6.xx Content analysis details: (2.2 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [URIs: gmx.de] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.9 SPF_FAIL SPF: sender does not match SPF record (fail) [SPF failed: Please see http://www.openspf.org/Why?s=mfrom;id=wolfgang.scherer%40gmx.de;ip=209.51.188.17;r=debbugs.gnu.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (wolfgang.scherer[at]gmx.de) -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [209.51.188.17 listed in list.dnswl.org] 2.0 SPOOFED_FREEMAIL No description available. X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.8 (/) This is a multi-part message in MIME format. --------------27A05B47FDAE0E731A585AE8 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable When a filename contains shell wildcard characters matching one or more fi= les, e.g. `test[56].xx` matching both `test5.xx` and `test6.xx`: =C2=A0 -rw-r--r--=C2=A0 1 ws ws=C2=A0=C2=A0=C2=A0 0 Feb=C2=A0 6 08:51 test= [56].xx =C2=A0 -rw-r--r--=C2=A0 1 ws ws=C2=A0=C2=A0=C2=A0 0 Feb=C2=A0 6 08:51 test= 5.xx =C2=A0 -rw-r--r--=C2=A0 1 ws ws=C2=A0=C2=A0=C2=A0 0 Feb=C2=A0 6 08:51 test= 6.xx The command `vc-git-state` does not work correctly. The attched patch fixes this: diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el index 2caa287..0314e5e 100644 =2D-- a/lisp/vc/vc-git.el +++ b/lisp/vc/vc-git.el @@ -330,7 +330,7 @@ in the order given by `git status'." =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ,= @(when (version<=3D "1.7.6.3" (vc-git--program-version)) =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 '("--ignored")) =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 "= --")) -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (status (apply #'vc-git--run-c= ommand-string file args))) +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (status (apply #'vc-git--run-c= ommand-string (shell-quote-argument file) args))) =C2=A0=C2=A0=C2=A0=C2=A0 (if (null status) =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ;; If status is nil, ther= e was an error calling git, likely because =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ;; the file is not in a g= it repo. --------------27A05B47FDAE0E731A585AE8 Content-Type: text/x-patch; name="0001-vc-git-state-fails-for-filenames-with-wildcards.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename*0="0001-vc-git-state-fails-for-filenames-with-wildcards.patch" =46rom d123319e15d5ff24d3353f0d5c1b5f46c22172e2 Mon Sep 17 00:00:00 2001 From: Wolfgang Scherer Date: Thu, 6 Feb 2020 14:41:12 +0100 Subject: [PATCH] vc-git-state fails for filenames with wildcards * lisp/vc/vc-git.el (vc-git-state): file argument must be quoted to avoid wildcard expansion by shell. =2D-- lisp/vc/vc-git.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el index 2caa287..0314e5e 100644 =2D-- a/lisp/vc/vc-git.el +++ b/lisp/vc/vc-git.el @@ -330,7 +330,7 @@ in the order given by `git status'." ,@(when (version<=3D "1.7.6.3" (vc-git--program-version)) '("--ignored")) "--")) - (status (apply #'vc-git--run-command-string file args))) + (status (apply #'vc-git--run-command-string (shell-quote-argument= file) args))) (if (null status) ;; If status is nil, there was an error calling git, likely becau= se ;; the file is not in a git repo. =2D- 2.7.4 --------------27A05B47FDAE0E731A585AE8-- From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 06 18:00:48 2020 Received: (at 39452) by debbugs.gnu.org; 6 Feb 2020 23:00:48 +0000 Received: from localhost ([127.0.0.1]:48730 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1izq8d-0000uL-RN for submit@debbugs.gnu.org; Thu, 06 Feb 2020 18:00:48 -0500 Received: from mail-lj1-f193.google.com ([209.85.208.193]:35329) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1izq8c-0000u9-PA for 39452@debbugs.gnu.org; Thu, 06 Feb 2020 18:00:47 -0500 Received: by mail-lj1-f193.google.com with SMTP id q8so82069ljb.2 for <39452@debbugs.gnu.org>; Thu, 06 Feb 2020 15:00:46 -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=P8dqNSF0NtKg8hBDXsGGEWpWTkgLd9Ij6+a3v1oqTs4=; b=dXMTNKLxHpbUCyTBsr0UEecjplXBihHbU7bPkAbteIa05AiY+20HJKwyHNeU/TEjQD UC+izek37hv+zLh3YPY5K/oJOZXudYiXkMXGn8NdHUFnK/CuTs/c+/iwdSmQnh6EZLKo 2mriTdLnidqquTuGrAFpjG4moBNykvxdI7EzQFQzcCiC0ttouMt0/WON+68Jhe9dVW1k OQIG4QqprPJXbvlq3HHDTz1EyDZ5d0hNE1rhk8jU4PU0YCTX8HlAyXsMNr7qJ/e52HXC v+Z8Qaz1IUWSJSRbwlI+Q3frT2DiCXijrrZTss7qgxDKeM7U/WFzjr/bTIMTutOgDoB/ CgPw== 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=P8dqNSF0NtKg8hBDXsGGEWpWTkgLd9Ij6+a3v1oqTs4=; b=TvmGzpsqPILLG9pkJH2P/CxASdXJ8HismcxjUm+UkgrIXK4RFRu3iIwUvzsp8EaVcp e4x2LPYYQlMzChRb45aBpDPbNh9+f6Bboq9MdFRZjX1tz+mehJZnjkV0GK/OA94eyGSK IWr1NMQX/1Ze/5v9TfRS8JJzmVOXpRN8EQIdf4lkhj5wtxd2ThzxLuetW/X/nTfF/Win pX0xem/90A5zCQIJFKR4xUXfVgWTKs939Yd0EvLn1QW7rx3zlMeFtv4m4Jy6GWA5+y5J o3YhOCHvS0PLng/3K0nzD0R7Eop3QbxLNWwRHCbjOWccWeReG8vZtCp8m30zX7pCIKB2 Tq4A== X-Gm-Message-State: APjAAAXl7qOLU6sXsYV6zB0m4IYjClQKvMQAIQiZueLweoxYIkse/6SH fGnpjRz4TQQCGRq42jlbETv065ii5VQ= X-Google-Smtp-Source: APXvYqxgn0lpeu4HcDcHrxEDq+a0bE9txhK1Mj0tF7ByHkpkou6AKK1payb+xM5DBgJF+64aDQ9mLw== X-Received: by 2002:a2e:94c8:: with SMTP id r8mr3491655ljh.28.1581030040033; Thu, 06 Feb 2020 15:00:40 -0800 (PST) Received: from [192.168.1.142] ([178.252.127.239]) by smtp.googlemail.com with ESMTPSA id 144sm270422lfi.67.2020.02.06.15.00.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 06 Feb 2020 15:00:39 -0800 (PST) Subject: Re: bug#39452: [PATCH] vc-git-state fails for filenames with wildcards To: Wolfgang Scherer , 39452@debbugs.gnu.org References: From: Dmitry Gutov Message-ID: Date: Fri, 7 Feb 2020 02:00:38 +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: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit 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: Hi Wolfgang, On 06.02.2020 16:59, Wolfgang Scherer wrote: > When a filename contains shell wildcard characters matching one or more files, e.g. `test[56].xx` matching both `test5.xx` and `test6.xx`: > >   -rw-r-- [...] Content analysis details: (2.0 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (raaahh[at]gmail.com) -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.208.193 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.208.193 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: 39452 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) Hi Wolfgang, On 06.02.2020 16:59, Wolfgang Scherer wrote: > When a filename contains shell wildcard characters matching one or more files, e.g. `test[56].xx` matching both `test5.xx` and `test6.xx`: > >   -rw-r--r--  1 ws ws    0 Feb  6 08:51 test[56].xx >   -rw-r--r--  1 ws ws    0 Feb  6 08:51 test5.xx >   -rw-r--r--  1 ws ws    0 Feb  6 08:51 test6.xx > > The command `vc-git-state` does not work correctly. > > The attched patch fixes this: > > diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el > index 2caa287..0314e5e 100644 > --- a/lisp/vc/vc-git.el > +++ b/lisp/vc/vc-git.el > @@ -330,7 +330,7 @@ in the order given by `git status'." >              ,@(when (version<= "1.7.6.3" (vc-git--program-version)) >                  '("--ignored")) >              "--")) > -        (status (apply #'vc-git--run-command-string file args))) > +        (status (apply #'vc-git--run-command-string (shell-quote-argument file) args))) >      (if (null status) >          ;; If status is nil, there was an error calling git, likely because >          ;; the file is not in a git repo. > Thanks for the report and the patch. I wonder how many other backends commands are broken for files like that: we basically never shell-quote file names. From debbugs-submit-bounces@debbugs.gnu.org Fri Feb 07 02:58:25 2020 Received: (at 39452) by debbugs.gnu.org; 7 Feb 2020 07:58:25 +0000 Received: from localhost ([127.0.0.1]:48829 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1izyWv-00073v-2G for submit@debbugs.gnu.org; Fri, 07 Feb 2020 02:58:25 -0500 Received: from eggs.gnu.org ([209.51.188.92]:56336) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1izyWt-00073j-Kw for 39452@debbugs.gnu.org; Fri, 07 Feb 2020 02:58:24 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:35805) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1izyWm-0003uE-Qf; Fri, 07 Feb 2020 02:58:16 -0500 Received: from [176.228.60.248] (port=4815 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1izyWl-0001vO-7S; Fri, 07 Feb 2020 02:58:16 -0500 Date: Fri, 07 Feb 2020 09:57:54 +0200 Message-Id: <83h802g77h.fsf@gnu.org> From: Eli Zaretskii To: Dmitry Gutov In-reply-to: (message from Dmitry Gutov on Fri, 7 Feb 2020 02:00:38 +0300) Subject: Re: bug#39452: [PATCH] vc-git-state fails for filenames with wildcards References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 39452 Cc: 39452@debbugs.gnu.org, Wolfgang.Scherer@gmx.de X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > From: Dmitry Gutov > Date: Fri, 7 Feb 2020 02:00:38 +0300 > > I wonder how many other backends commands are broken for files like > that: we basically never shell-quote file names. Whenever we run commands via the shell, the prudent thing is to always quote file names (and in general any argument that might include wildcard characters). One advantage of call-process is that you don't have to do that. From debbugs-submit-bounces@debbugs.gnu.org Fri Feb 07 03:43:46 2020 Received: (at 39452) by debbugs.gnu.org; 7 Feb 2020 08:43:47 +0000 Received: from localhost ([127.0.0.1]:48876 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1izzEo-00086Y-KU for submit@debbugs.gnu.org; Fri, 07 Feb 2020 03:43:46 -0500 Received: from mail-lf1-f65.google.com ([209.85.167.65]:43166) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1izzEm-00086J-L9 for 39452@debbugs.gnu.org; Fri, 07 Feb 2020 03:43:45 -0500 Received: by mail-lf1-f65.google.com with SMTP id 9so974058lfq.10 for <39452@debbugs.gnu.org>; Fri, 07 Feb 2020 00:43:44 -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=7gR4P6UdQFsdcord911udul5UZ6RvaWOiZ6KvhvHXUA=; b=P90sR5qvEDU5my/LvJEzPvwdSuUFadqfF3mMagwmiVwXF14ECAhBuFBOj3HDodS3pZ cAqYmR1PMF4tnqE73a3/wOFCAbHoSItuBLkXEj5wXDOwhrHq4KACxEXo56NeFEooGk5O CMzNOY0wZwduKH6PNMLRriB48+R002hLOBHH/TchoVCxiwZgx8TEOWP6w0Rw8BPEZ3Ge MkQlh9XMF75nI89Gq5RtfIpzvvE/BlWEAfwA3E8OE4KoiYdCIevba9JlHITK8fSV25MH 4ena/qdlYkxGcffZrXP+cV/3zDQKPDWYTZQCtjl/kiZ5D2inCuc0rB1k+u8FQ/+F4Svx 6pvQ== 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=7gR4P6UdQFsdcord911udul5UZ6RvaWOiZ6KvhvHXUA=; b=l9uKMIokH241qcEll1hYf/y0EANQgnyiLAQdYbG09F+yIK09fi5BXb5NxZxNI/Qyav JJzZ4eicKJqkebYQp0bHCfZNkhMo0zhgXkAMtYRbuKxIwaBZpPTOE4oz+tuQiHxUGq8d Ue4TkRmVsqIHZPhsbAmgoZ4MyJ94iuVtFOW1lT8fpWFV2YlNmeTorZv5Dm3lgwCG0JfX 5SOue+CDU7bqgVFGakkqtgjUQcFpv00iRy7T6Df1YFQ/vUCi+bKjIXUSl/pLzqIRVYYW KQMNzLootYFIc3RviCPFoARkbGxNoy86+6btzkYvzgxqVG3ErgzuST4nnYeMPTU3nFh2 v7/w== X-Gm-Message-State: APjAAAXQ56uJsB9D0qDURIrJsqkr9D67+SBgdPI/0QThFqY93Xv2GH9A sW+mYYO9lvorL9PxhNeR6WY= X-Google-Smtp-Source: APXvYqwS3eIsjMyozvDvZ4hcZ60RrVwBAQxPqpcH2rZ9oO4N0FxXWA4YF2/GvKCW/0iYAga1+0RfVw== X-Received: by 2002:ac2:52a3:: with SMTP id r3mr3978590lfm.189.1581065018515; Fri, 07 Feb 2020 00:43:38 -0800 (PST) Received: from [192.168.1.142] ([178.252.127.239]) by smtp.googlemail.com with ESMTPSA id i20sm749188lfl.79.2020.02.07.00.43.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 07 Feb 2020 00:43:37 -0800 (PST) Subject: Re: bug#39452: [PATCH] vc-git-state fails for filenames with wildcards To: Eli Zaretskii References: <83h802g77h.fsf@gnu.org> From: Dmitry Gutov Message-ID: <8f427281-510c-30c3-995f-364e22d9c1e2@yandex.ru> Date: Fri, 7 Feb 2020 11:43:36 +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: <83h802g77h.fsf@gnu.org> 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 07.02.2020 10:57, Eli Zaretskii wrote: >> From: Dmitry Gutov >> Date: Fri, 7 Feb 2020 02:00:38 +0300 >> >> I wonder how many other backends commands are broken for files like >> that: we basicall [...] Content analysis details: (2.0 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [URIs: yandex.ru] 1.5 RCVD_IN_SORBS_WEB RBL: SORBS: sender is an abusable web server [178.252.127.239 listed in dnsbl.sorbs.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.167.65 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (raaahh[at]gmail.com) -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.167.65 listed in wl.mailspike.net] 0.2 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different X-Debbugs-Envelope-To: 39452 Cc: 39452@debbugs.gnu.org, Wolfgang.Scherer@gmx.de X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) On 07.02.2020 10:57, Eli Zaretskii wrote: >> From: Dmitry Gutov >> Date: Fri, 7 Feb 2020 02:00:38 +0300 >> >> I wonder how many other backends commands are broken for files like >> that: we basically never shell-quote file names. > > Whenever we run commands via the shell, the prudent thing is to always > quote file names (and in general any argument that might include > wildcard characters). One advantage of call-process is that you don't > have to do that. It's not so simple. FILE already goes through call-process. But Git expects a pathspec, not just a file name. So if it's a glob, it is expanded. From debbugs-submit-bounces@debbugs.gnu.org Fri Feb 07 04:27:25 2020 Received: (at 39452) by debbugs.gnu.org; 7 Feb 2020 09:27:25 +0000 Received: from localhost ([127.0.0.1]:48894 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1izzv3-0000uN-Ge for submit@debbugs.gnu.org; Fri, 07 Feb 2020 04:27:25 -0500 Received: from eggs.gnu.org ([209.51.188.92]:48696) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1izzv1-0000u0-FM for 39452@debbugs.gnu.org; Fri, 07 Feb 2020 04:27:24 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:36692) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1izzuv-0005QJ-TO; Fri, 07 Feb 2020 04:27:17 -0500 Received: from [176.228.60.248] (port=2261 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1izzuu-0002Jt-Lz; Fri, 07 Feb 2020 04:27:17 -0500 Date: Fri, 07 Feb 2020 11:26:54 +0200 Message-Id: <837e0yg335.fsf@gnu.org> From: Eli Zaretskii To: Dmitry Gutov In-reply-to: <8f427281-510c-30c3-995f-364e22d9c1e2@yandex.ru> (message from Dmitry Gutov on Fri, 7 Feb 2020 11:43:36 +0300) Subject: Re: bug#39452: [PATCH] vc-git-state fails for filenames with wildcards References: <83h802g77h.fsf@gnu.org> <8f427281-510c-30c3-995f-364e22d9c1e2@yandex.ru> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 39452 Cc: 39452@debbugs.gnu.org, Wolfgang.Scherer@gmx.de X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > Cc: 39452@debbugs.gnu.org, Wolfgang.Scherer@gmx.de > From: Dmitry Gutov > Date: Fri, 7 Feb 2020 11:43:36 +0300 > > On 07.02.2020 10:57, Eli Zaretskii wrote: > >> From: Dmitry Gutov > >> Date: Fri, 7 Feb 2020 02:00:38 +0300 > >> > >> I wonder how many other backends commands are broken for files like > >> that: we basically never shell-quote file names. > > > > Whenever we run commands via the shell, the prudent thing is to always > > quote file names (and in general any argument that might include > > wildcard characters). One advantage of call-process is that you don't > > have to do that. > > It's not so simple. FILE already goes through call-process. But Git > expects a pathspec, not just a file name. So if it's a glob, it is expanded. What I wrote was a response to your "we basically never quote". Let me correct my perhaps too-general response by saying "the prudent thing is to always quote file names, unless the command expects a wildcard in that argument". From debbugs-submit-bounces@debbugs.gnu.org Fri Feb 07 06:43:25 2020 Received: (at 39452) by debbugs.gnu.org; 7 Feb 2020 11:43:25 +0000 Received: from localhost ([127.0.0.1]:48944 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j022f-00068N-Bm for submit@debbugs.gnu.org; Fri, 07 Feb 2020 06:43:25 -0500 Received: from mail-lj1-f193.google.com ([209.85.208.193]:37221) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j022d-000687-Gj for 39452@debbugs.gnu.org; Fri, 07 Feb 2020 06:43:23 -0500 Received: by mail-lj1-f193.google.com with SMTP id v17so1810269ljg.4 for <39452@debbugs.gnu.org>; Fri, 07 Feb 2020 03:43:23 -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=3ns24JsdkF6JzszgN8093tBAaVRg6GC9ccc4mvHzQT0=; b=WPojKz9ZgO9svvbfFmKOjeWVgImwZODbtCPR/F2R4r+StliGuASsxhPp573TSb6sIV +vrEqLIJ5qMdIKu+0Ue3ETnom2yiNsJfnFpl83Y9ObYA4h7rI194u1MXdd4tC/dIOV0B Ww/2+Gkw+DrBvyYt6cJeBt9mMvdoE7B2Gw/Z+lV3Vc9xrBhwnSGgVoNqIQt6W/4ZY+bg rzWHAy3gZOiLxxs17T+Jdeii5/Pyus19tU04jL9fNuDi04EcFe7RICfWqfeB15/3RCCU hyKQ36JK6vp8eeXKNCyqcIxNF4mY848xU+hS3qMXEF8FZE8v8ZV0dEOil84DLWJlNYfa iSYA== 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=3ns24JsdkF6JzszgN8093tBAaVRg6GC9ccc4mvHzQT0=; b=BoaLw0DRG5J4yjibGD8L0GVX9Ob/0ST8cu+/V03sMQZsxg+NgxPnc4crDOx0+WdQqI fUk+XM2KbMnLRViupZFIvxOW6976WxuWH2F/S4uxLTBUdKdAzoew2CaiuVObxSaTyP6G xv1o9Qa4w2FQb1F0qKHQXae36ELldp8s20rsHOKGiP+xE8b/x5Aoy3j2zbM8CfryEcjr pc6/PLnps8fWMXuOA/T7y2ZYqJe5EGijsNV62h7K5ZhXV6p0aKMeMsh8HVl+yUq1S16m afczWffp5n/2F7p24gUe7YO4MXKvm+GN8xnTSPR6Kekmo20Ffn7i8AWDOT0rInq32kdA veNA== X-Gm-Message-State: APjAAAX51ODCvRS8zFAN7DbT2LIuQS6/kHoCtgOQLy2kssx/wnUZFxK4 xVtqsiY7t2rhoK1ME7qcj+E= X-Google-Smtp-Source: APXvYqwR4JrNj/AiCsR1uhrv0lN4zhDu67jb9Nmi2RlPU4fKfmMJm4TKuwm5bLQP1yXh6C0hnQ94mA== X-Received: by 2002:a2e:a402:: with SMTP id p2mr5206519ljn.143.1581075797303; Fri, 07 Feb 2020 03:43:17 -0800 (PST) Received: from [192.168.1.142] ([178.252.127.239]) by smtp.googlemail.com with ESMTPSA id h19sm1073811ljl.57.2020.02.07.03.43.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 07 Feb 2020 03:43:16 -0800 (PST) Subject: Re: bug#39452: [PATCH] vc-git-state fails for filenames with wildcards To: Eli Zaretskii References: <83h802g77h.fsf@gnu.org> <8f427281-510c-30c3-995f-364e22d9c1e2@yandex.ru> <837e0yg335.fsf@gnu.org> From: Dmitry Gutov Message-ID: <5641ee6c-0b79-e405-74d5-1edf184c58cb@yandex.ru> Date: Fri, 7 Feb 2020 14:43:15 +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: <837e0yg335.fsf@gnu.org> 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 07.02.2020 12:26, Eli Zaretskii wrote: > What I wrote was a response to your "we basically never quote". ...file names in vc-git.el because we've been relying on call-process. > Let > me correct my perhaps too-general response by saying "the prudent > thing is to always quote file names, unless the command expects a > wildcard in that argument". Content analysis details: (2.0 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.5 RCVD_IN_SORBS_WEB RBL: SORBS: sender is an abusable web server [178.252.127.239 listed in dnsbl.sorbs.net] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (dgutov[at]yandex.ru) -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.208.193 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.208.193 listed in wl.mailspike.net] 0.2 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different X-Debbugs-Envelope-To: 39452 Cc: 39452@debbugs.gnu.org, Wolfgang.Scherer@gmx.de X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) On 07.02.2020 12:26, Eli Zaretskii wrote: > What I wrote was a response to your "we basically never quote". ...file names in vc-git.el because we've been relying on call-process. > Let > me correct my perhaps too-general response by saying "the prudent > thing is to always quote file names, unless the command expects a > wildcard in that argument". I would say that differently: ...to always quote files names when the command expects a wildcard, but we want the file name to be treated verbatim. From debbugs-submit-bounces@debbugs.gnu.org Fri Feb 07 09:44:01 2020 Received: (at 39452) by debbugs.gnu.org; 7 Feb 2020 14:44:02 +0000 Received: from localhost ([127.0.0.1]:49033 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j04rR-0005Y2-G8 for submit@debbugs.gnu.org; Fri, 07 Feb 2020 09:44:01 -0500 Received: from mail-qt1-f193.google.com ([209.85.160.193]:46973) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j04rP-0005Xc-PX for 39452@debbugs.gnu.org; Fri, 07 Feb 2020 09:44:00 -0500 Received: by mail-qt1-f193.google.com with SMTP id e25so1955014qtr.13 for <39452@debbugs.gnu.org>; Fri, 07 Feb 2020 06:43:59 -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 :user-agent:mime-version; bh=B+1+tc76Pr2QbTN4rLIIPoASmc518FuAcs7HYEHVMVw=; b=ccLb54mF/tAp+BnDLuzVvDfNr/+bxekfqQh4L9qkyQsxpnQ8EOrm6FJ6l2BB5bFQiJ 4Lo8VXPCnY09pFgezVgxpz0iGf1z3JWpYIPcGX3Ga3Cc9b+BM4+VXAEksY2juW6vrP5I epgovl9bfjF9hDeYfI0FaKd2AJBpwqfzD34lgdRxFV1XBtBwyIwjHivFhpqc13Nr7kxr CeGo8iiaeDz9gPHBuLHFdzKB3Q7VbHNmHKhN3euHy5rqov86RYJ46pWvrPBkUyT6Ptgw d4ZN8DdQjttwZ9nHjsBBHIWrInGy7C3JLqMNNEnXsazKUNjNY4S3X8pnGcJvUM+jYzQV AWow== 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:user-agent:mime-version; bh=B+1+tc76Pr2QbTN4rLIIPoASmc518FuAcs7HYEHVMVw=; b=r+fh8uMKXf95kTb8LCsGqRDysRXJCnZ5kPbZnZKx4iKDv3KLEiSbjBXWcT0/M58BfA RWP3F6lyQULhJOu3yQRAUhO5rA41fXb0npMvPEhI1Bydp2dW3RScKtE6zGIuXxLgB+6P r3535jo27U+PSS+HpIRtnpPFMWkis1xpGwE0qlOI3VskswMwjFY4PMntBzXgX5cZUMTS qUPUCkEHxj5i3ZWojB0dbtbl46F7WAR6yuqvQbJpT3if60dq4fZGK9qSezRM3syWAr31 I+Tx0tDsoPmSZNll0AIzCVBaT5FgAdG+Y8bkP9F0X4HfSh4nVaVw2PrkJqg0MeBSAK0v yEYQ== X-Gm-Message-State: APjAAAUktK4kW+34XyFZB10O4XxRobMHf7CKR//POnAnovzHaUKDnqm2 LYmkYfLVJO/V8pVS2o+nZYg= X-Google-Smtp-Source: APXvYqzh6QjrDTNDiTrEoILZv6gwgKCJKL5l3jKy2AXsSfIQqTKQ9UlP/geVeWhIRtvPIgX4YXoFPw== X-Received: by 2002:ac8:6b98:: with SMTP id z24mr7710479qts.392.1581086634216; Fri, 07 Feb 2020 06:43:54 -0800 (PST) Received: from vhost2 (CPE001143542e1f-CMf81d0f809fa0.cpe.net.cable.rogers.com. [99.230.38.42]) by smtp.gmail.com with ESMTPSA id v78sm1386510qkb.48.2020.02.07.06.43.52 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 07 Feb 2020 06:43:53 -0800 (PST) From: Noam Postavsky To: Dmitry Gutov Subject: Re: bug#39452: [PATCH] vc-git-state fails for filenames with wildcards References: <83h802g77h.fsf@gnu.org> <8f427281-510c-30c3-995f-364e22d9c1e2@yandex.ru> Date: Fri, 07 Feb 2020 09:43:51 -0500 In-Reply-To: <8f427281-510c-30c3-995f-364e22d9c1e2@yandex.ru> (Dmitry Gutov's message of "Fri, 7 Feb 2020 11:43:36 +0300") Message-ID: <85y2texxso.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (windows-nt) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 39452 Cc: Eli Zaretskii , 39452@debbugs.gnu.org, Wolfgang.Scherer@gmx.de X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Dmitry Gutov writes: > It's not so simple. FILE already goes through call-process. But Git > expects a pathspec, not just a file name. So if it's a glob, it is > expanded. You can pass --literal-pathspecs to tell git not to expand. Magit does this. But there is a downside due to the way git implements it, which is by setting an environment variable: it affects all subprocesses git calls, including git-hook scripts which tends to trip people up. From debbugs-submit-bounces@debbugs.gnu.org Fri Feb 07 12:25:37 2020 Received: (at 39452) by debbugs.gnu.org; 7 Feb 2020 17:25:37 +0000 Received: from localhost ([127.0.0.1]:50195 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j07No-0001TA-Qs for submit@debbugs.gnu.org; Fri, 07 Feb 2020 12:25:37 -0500 Received: from mout.gmx.net ([212.227.15.18]:38917) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j07Nm-0001Ss-NG for 39452@debbugs.gnu.org; Fri, 07 Feb 2020 12:25:36 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1581096328; bh=f2YgxxQH09RRTNNqlcLPxnlHc8ce6wrU6Bh0RXEp5To=; h=X-UI-Sender-Class:Subject:To:References:From:Date:In-Reply-To; b=aDs6DuLr9gOyUC4xsI6biCeFnF9a+2GgFBxrohF1nYsIl6XOwQ/Rg82M5EobfzllI lqa7cN51+auYLKB0X5fvhK7VdBJHDTzlzK7rE4Qbl2RiILPRm+StKoZ86rVSoxD3o3 qSvQxg6zp4z1nsAfII97JMuEzNzH04MT293dPx04= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from sheckley.simul.de ([87.160.210.52]) by mail.gmx.com (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MbRk3-1jWh2f1vVh-00bpDc; Fri, 07 Feb 2020 18:25:28 +0100 Received: from [127.0.0.1] (sheckley.simul.de [127.0.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by sheckley.simul.de (Postfix) with ESMTPSA id 41ACD19431CA; Fri, 7 Feb 2020 18:25:27 +0100 (CET) Subject: Re: bug#39452: [PATCH] vc-git-state fails for filenames with wildcards To: Dmitry Gutov , 39452@debbugs.gnu.org References: From: Wolfgang Scherer Openpgp: preference=signencrypt Autocrypt: addr=Wolfgang.Scherer@gmx.de; prefer-encrypt=mutual; keydata= xsDiBEb46IgRBACMHOAb1KNo1Ylk+ebri+4R+bG4tyKlqBlrpv8D9/ZwRdXSGt+0DyCHoaAd 7KW7noHapLe87DunABOjKG4nqTGv+dRiWuUBlp3I4aYRFDVa3Da+XnIYkMHKqhK59VEHQCdp Km42nuLS7TS+n99at9YwzTG6VBdOlBKTlRFngOjVLwCg1RGXJ6X3EjS1FKCQeXziURVpWlkD /2zY6Ayhxi62TS84VjikXrrmjXykAAaAmMVEyKKYb9L5pGlqiZz9g/K9xw1EUoZTYuaufquD v4rAGR58K/3V4CYfJLEeshMWiaXHvMmlxMznlG16/um4MvmR8B3r+cx0nOPK1JBdD2qrkNnF Mw8FB+zouLFB4Gt2IUC5IlOmZ8OQA/4qdU53CItzWsCr9Nux4L0qUlRweSmCnV8xGQ2wP5XI MawIQxxREvSrsYDG8cNnYETMg4iQFfIktwAoxCJvuFAwIB6ZxHGF4FcEZm64CXc2u7CmFLqt rVhXhIfMz9oEYC+HhGczGamn9ofbGTFd2hJEtPcQgWNR4f7+aKknmi2+OM0fV29sZmdhbmcg U2NoZXJlciA8d3NAc3ctYW10LndzPsJhBBMRAgAhBQJYmz3YAhsjBQsJCAcCBhUICQoLAgQW AgMBAh4BAheAAAoJEIUCr3Gr112VZZoAoLTBSTp1qGuNhLdXY04iaWCMYmHCAJ4kHPtQ6nTw kEq9qCHgVgXDaY7wjs7ATQRG+OiIEAQAhi0wjcxvA4tychg2NQuwBIf9LX/46l+74+QbewCn a4a+mw/9s5KYqLGtYMuu3/KYq9yBd53OYc7LWTLMxsGOIATSOQRhdCKYW1AanupYrC/bKNW/ 8i2QEXc7LIeYiaII0TkVdQTVZxrg9kKLQ+Vf6z04Lbfv91sVCkHKI9jxgVMAAwUD/0mkDeN0 tllPH+NOjbkkqlOj6UOwzwIYgXmALhuAEFGXVLM2HfRV9TtJa2OoGZiuhyGXat3Jl9QK9NNv d/J4HSal93ZHWstPU4YIRc5uhJ1eeWwKsfTmPvbZXMKMkh+hBBJ39SZnmxfoeUzkK0EQNE2p PZDyjAlz03qOx6D0DHnZwkkEGBECAAkFAkb46IgCGwwACgkQhQKvcavXXZU8PwCdGmUH5mbh dsLYyx7qthe4hOWnW54AoJQMfmHP4uUI6ji8VkdlvO8LKtLP Message-ID: <3a7c412d-4926-9109-8545-31268ce37fca@gmx.de> Date: Fri, 7 Feb 2020 18:25:27 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Content-Language: de-DE X-Provags-ID: V03:K1:v7LrIam9do+NdMp8OqWZzecPNkEmpvkyddWwZMRmWW3ugn6+YHl zYTzdbP+kS1LVKraxbesst0+N5nCYTmYHnnIQ4f1NRBkkqmmYIizRsG/nZn4gmftHvDAQtz 6eOdYqyQs3AjLbnruWJnKtYj2VCkNTxmBuDYNoiIE+5ArPCBrgUxJ8vTcWYGw1yGAQtENcy yOoAubGEVLQeI47Cm2Rqg== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:9NKCSFwSGN0=:DNhY298BUpZ4GbsZ3JXW6S lU8nBQVOHF8pXyZuXIXJy5Yv+82WO68cM0hCzUY/zen5I5STttrz8qp9jAAEfqANCSJNNBsam bcMYbUtOhsagYuCdzYtU4yb2KplhN+haf/ECVkdrmjA3CO8vVy+tzu1HBhbyKm72ppvzn9i+x nDUwIjSYkdIckmScqg4HRV230/abTy2ZPUzQHjr+53vrP2B6k1vaxTSH56qOdQ/eKZjoopfXd /7f8TuUjN/Se4IPYkh8FBSogFSw1u3eLk5prF66Tf4+cWhLx1BWuJhTA2Un55loRgB5qeubZC BqLkd0GOt2P0LemwJnmbkBtsrMFtL6ACy10KBLkR0d1TKs6JMx204yjOAy/GHGw9eB2/tQECh MyIxhSJUDNVmOXy+VmzETQaTvkfYpK3v5oycWxh5ZnGHnKp3F3ANjkcgFNLtbqkU9jjia6K6Z XCrMB1dFY+Ss/q4n2qrmDKFcCysn21HaTNigUVSsqITLB3/a9pkeqoCn5V/q/AhsC3yDLVA6k TAOuEX18xcdwXivmIZ0EBOh9/rkfCxTFW/OwdoILJ0WZhD9LRQMY0tWLmfeIEqWIPzJLSOfKO rHPk+ya/lLzp5ixWF735W1zLzKghATZ2/IhZkw9PWcy8370yFnghLPaUuD+PShGR11mua8nYc uknZ8ODP+trulKDohXwUpD5iJRCAePsKQu54BubZpLvMzROGLqQrnIWZaGueThbMfGn67u0gi wmSzCKFWUkwckEfeIoK0F2LmAPh915iycKWM+vN7D47299anJh0NrPtfFFN+ER8qao+XaXvFo S/BELqLnSV4jhfZvkZGXXuHJ0o2gHXmCWpwrwn9x3b+HgD8E0ZgoxZHMhg641oMg6J4yCChY9 9AGIlUmSdyNBeIwuU7lPn4OLOakAww+BEoXkXVNYq3/lQIWKNnbCWI5dAi1ItkJSRHh89F/4C BK59zoeXGwJf/qVHJ68css7wmxZAL6Pj/CKImDJ0umpGfNO3f/z2cEMHO6StXjBf8qCdOPjOu YFiv7IFw05zLFarX3B9nYTyfZLVQftb3i3P+IJUuAt++6NCnYqAXqMi9GEJeojeNxUbvvVR1Z uBAIh5AtXz2OkPm4u5IvSRxlVTQMJ6TakmqooHDX1RJSqqCIABazuD5hTDDvr51MWQ3wpbnky c9p6eUpzzcujmw57terwdVd0SYFiWOb8/VaQAMgMxIzBsEFGbf2Y78t3k/8kxdS9MojdOg+BC 2Afjcar1rdXrIOa58 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 39452 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Hi Dmitry, Am 07.02.20 um 00:00 schrieb Dmitry Gutov: > > On 06.02.2020 16:59, Wolfgang Scherer wrote: >> When a filename contains shell wildcard characters matching one or more= files, e.g. `test[56].xx` matching both `test5.xx` and `test6.xx`: >> The command `vc-git-state` does not work correctly. >> >> The attched patch fixes this: >> >> -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (status (apply #'vc-git--ru= n-command-string file args))) >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (status (apply #'vc-git--ru= n-command-string (shell-quote-argument file) args))) >> > > Thanks for the report and the patch. > > I wonder how many other backends commands are broken for files like that= : we basically never shell-quote file names. I finally decided to fully implement the vc ignore feature for all backend= s. So once I am finished, I will have tested all vs-backend-state function= s with filenames containing glob special characters. Since call-process is already used in vc-git, the function shell-quote-arg= ument is not really appropriate. For the ongoing vc ignore implementation I needed a glob escape function, = which only escapes special glob characters and backslash (see http://sw-am= t.ws/emacs/doc/_build/html/emacs-vc-ignore-feature.html): (defun vc-glob-escape (string) =C2=A0 "Escape special glob characters in STRING." =C2=A0 (save-match-data =C2=A0=C2=A0=C2=A0 (if (string-match "[\\?*[]" string) =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (mapconcat (lambda (c) =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (pcase c =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (?\\ "\\\\") =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (?? "\\?") =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (?* "\\*") =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (?\[ "\\[") =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (_ (char-to-s= tring c)))) =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 string "") =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 string))) As for other occurences of glob errors in vc-git, The function vc-git-dir-= status-files also suffers from this bug, when the FILES argument is non-ni= l: ;; (let ((default-directory "/srv/install/linux/emacs/check-git/")) (vc-gi= t-dir-status-files nil '("/srv/install/linux/emacs/check-git/test[56].xx")= (lambda (&rest args) args))) fatal: pathspec 'test[56].xx' did not match any files test5.xx^@test6.xx^@test[56].xx^@ Various other git commands, like vc-git-revert, vc-git-checkin also use gl= ob expansion and are therefore broken. From debbugs-submit-bounces@debbugs.gnu.org Fri Feb 07 17:32:02 2020 Received: (at 39452) by debbugs.gnu.org; 7 Feb 2020 22:32:02 +0000 Received: from localhost ([127.0.0.1]:50401 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j0CAL-0004JZ-U5 for submit@debbugs.gnu.org; Fri, 07 Feb 2020 17:32:02 -0500 Received: from mout.gmx.net ([212.227.15.15]:56259) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j0CAJ-0004JD-Cn for 39452@debbugs.gnu.org; Fri, 07 Feb 2020 17:32:00 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1581114712; bh=iBZZKoe90fNqbyMS9WPn1HKqgbUCZBJs2JwMO0Jn90o=; h=X-UI-Sender-Class:Subject:From:To:References:Date:In-Reply-To; b=JxYcBtzGyN2UiWRHRU6YiaaPWF7M8yymeAHuCtyHg4fpKIhQVeygSq/mLBx16tH79 YSl/QCo9EzFhrFBQm8eaqBqb7xOXHcGRXJ1Zoc+ievzkwnQ7XgKsTRJFkjvW9B0pcC tjvrlxyXqBYLPslNnEyjW+le9XjQ337MaCUeyBEk= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from sheckley.simul.de ([87.160.210.52]) by mail.gmx.com (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MDysg-1iqG0y2s1U-009whq; Fri, 07 Feb 2020 23:31:52 +0100 Received: from [127.0.0.1] (sheckley.simul.de [127.0.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by sheckley.simul.de (Postfix) with ESMTPSA id 336D619431CB; Fri, 7 Feb 2020 23:31:52 +0100 (CET) Subject: Re: bug#39452: [PATCH] vc-git-state fails for filenames with wildcards From: Wolfgang Scherer To: Dmitry Gutov , 39452@debbugs.gnu.org References: <3a7c412d-4926-9109-8545-31268ce37fca@gmx.de> Openpgp: preference=signencrypt Autocrypt: addr=Wolfgang.Scherer@gmx.de; prefer-encrypt=mutual; keydata= xsDiBEb46IgRBACMHOAb1KNo1Ylk+ebri+4R+bG4tyKlqBlrpv8D9/ZwRdXSGt+0DyCHoaAd 7KW7noHapLe87DunABOjKG4nqTGv+dRiWuUBlp3I4aYRFDVa3Da+XnIYkMHKqhK59VEHQCdp Km42nuLS7TS+n99at9YwzTG6VBdOlBKTlRFngOjVLwCg1RGXJ6X3EjS1FKCQeXziURVpWlkD /2zY6Ayhxi62TS84VjikXrrmjXykAAaAmMVEyKKYb9L5pGlqiZz9g/K9xw1EUoZTYuaufquD v4rAGR58K/3V4CYfJLEeshMWiaXHvMmlxMznlG16/um4MvmR8B3r+cx0nOPK1JBdD2qrkNnF Mw8FB+zouLFB4Gt2IUC5IlOmZ8OQA/4qdU53CItzWsCr9Nux4L0qUlRweSmCnV8xGQ2wP5XI MawIQxxREvSrsYDG8cNnYETMg4iQFfIktwAoxCJvuFAwIB6ZxHGF4FcEZm64CXc2u7CmFLqt rVhXhIfMz9oEYC+HhGczGamn9ofbGTFd2hJEtPcQgWNR4f7+aKknmi2+OM0fV29sZmdhbmcg U2NoZXJlciA8d3NAc3ctYW10LndzPsJhBBMRAgAhBQJYmz3YAhsjBQsJCAcCBhUICQoLAgQW AgMBAh4BAheAAAoJEIUCr3Gr112VZZoAoLTBSTp1qGuNhLdXY04iaWCMYmHCAJ4kHPtQ6nTw kEq9qCHgVgXDaY7wjs7ATQRG+OiIEAQAhi0wjcxvA4tychg2NQuwBIf9LX/46l+74+QbewCn a4a+mw/9s5KYqLGtYMuu3/KYq9yBd53OYc7LWTLMxsGOIATSOQRhdCKYW1AanupYrC/bKNW/ 8i2QEXc7LIeYiaII0TkVdQTVZxrg9kKLQ+Vf6z04Lbfv91sVCkHKI9jxgVMAAwUD/0mkDeN0 tllPH+NOjbkkqlOj6UOwzwIYgXmALhuAEFGXVLM2HfRV9TtJa2OoGZiuhyGXat3Jl9QK9NNv d/J4HSal93ZHWstPU4YIRc5uhJ1eeWwKsfTmPvbZXMKMkh+hBBJ39SZnmxfoeUzkK0EQNE2p PZDyjAlz03qOx6D0DHnZwkkEGBECAAkFAkb46IgCGwwACgkQhQKvcavXXZU8PwCdGmUH5mbh dsLYyx7qthe4hOWnW54AoJQMfmHP4uUI6ji8VkdlvO8LKtLP Message-ID: <02dc1f27-64b2-7754-e0c0-5f09922173fa@gmx.de> Date: Fri, 7 Feb 2020 23:31:52 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.1 MIME-Version: 1.0 In-Reply-To: <3a7c412d-4926-9109-8545-31268ce37fca@gmx.de> Content-Type: multipart/mixed; boundary="------------DFBC9CFE6205859F41BECF80" Content-Language: de-DE X-Provags-ID: V03:K1:sZQs04zh2z1atFymy3+5I3c/VVFProhnX42E8J3H6BxE1k0tf1+ dO7aL01HaQDTIK0AvLqBN7u7yNuUqbADhtDjvUPzHGqDkCuN+NtY5Ml0/8bqYJGu8ruyGUt Bxh0JrAIQzTscUMQ81A/Yax3fK9J5LsU+mlfZ2efQ0x4rUyZb2/OGI+EGncRPGfHZIkYyjs 4DnkW6bo2MQK+b+v5l8qg== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:HU7VVmnFstA=:c7RCfOz3uSYQsSzD16zhC0 7mYgOIfsopraKnxRUf6Nv7rJ7F/m8xJPayYBh0kH5OAbTpjRsxghJuRGxXr14Zc6cndnnadI4 2VAYULGZZ1ejOoi09NMzMT89ANslRI+uUuN93F8sQO0VOkjaT3a4PsQCd6XA1lbanGt9Umsbo jrKcGxNWe8sxF8fhx8rqiZ8KIwdJwg4d7Z2UuZwmB33rOrcko9v9ui3dpnCqyf/F1gJZLOkDb 7J4jhspyJVikCbTwmTIUVor82PCh9Fbt4J8TB336/Zs6kJf++eV+/SEbzzavKP+IBEAMsPYJj j4L7TXbZ0iSCBwHB0Hzap8tzFIrNV9BR7QsKM5Sur1eCXrw/WyjmhroQQgBr0KTWoGgTWKjYr GNXbORsurZN98kvERlARH0bqM0y0B8Cw+q+722SyOfei2qd+d4FTIxUdDluG9+rl9U9s9zU0C VXmnmePg3SGxUPRHyBETCL6oKdPwB/Qj7OLTts0h3ZuvneN+mBTkd9PQcun9ar59/KTN7FXIt 07bXP0WiUUrhH3byurTXyLwHSM+Cao/r9TIcTiPf14e1T04FT/ysg5p3bz4t/bVbQmiQmERBS wGxLrNMhhr+Znrk9jzWGJRjxxOCVnSugPBHzBq/bEk8Qpuavnwf7Sx+dIR9atSIN5yXurjWcP JEA7F4z19hNy4ELSY3TRjr6d2wAVq/z4Duc7fFfd292PrtSN3hovxZpUQD0TSiguSOpYz6b/I +Z4LXW8ZawKi9C9jqEpOzq45L8lOUu52jgWgXC9s7pEnISXIs1ZVfsJO0Ro3PUfI9nl6q+MkJ ruewYrcoxUIxpsBw9ysMg/vIdRoFMA+/0uZITfvSt7zwO91geWiR7MMcA64gS5kZ0CJV3e7H/ 9N0/d4L1g6cHZRcVdYQ0/qQchU2UURW0+DhOhqeQJqnpMriOrK1JnMPv2dGA0pwMlB8zIgx/j RNPo4dNiZ4ARaTbLTzYkwUbDxPUqt0OT2Ct2gC8Ni1OrPf7l1kTCQ5KO2x5AyXpluThknK6M/ qfPZ4vIWmgKvFh0l63326rO2u26eJtJiX8ZfWKB9CEWpWUNPK4jHfQR3qzt5ISVu0cQ25sYqp 6nR3WNP6IgG/Nzol/+gWfiJY5s+rDlYp2zVhBrQC19rH2vWt7t3CPfnDHuydDwxjHwxYGm6fD 1FUXuVk8OvaXUoQzVpz1A1cRr+xMIcQYHDPig6Wmo0IsaGuDY6N4+QxCX6k27ZrnXGuyR7j9w 5gROFsyHZIqV0zej9 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 39452 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) This is a multi-part message in MIME format. --------------DFBC9CFE6205859F41BECF80 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Am 07.02.20 um 18:25 schrieb Wolfgang Scherer: > Hi Dmitry, > > Am 07.02.20 um 00:00 schrieb Dmitry Gutov: >> On 06.02.2020 16:59, Wolfgang Scherer wrote: >>> When a filename contains shell wildcard characters matching one or mor= e files, e.g. `test[56].xx` matching both `test5.xx` and `test6.xx`: >>> The command `vc-git-state` does not work correctly. >>> >>> The attched patch fixes this: >>> >>> -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (status (apply #'vc-git--r= un-command-string file args))) >>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (status (apply #'vc-git--r= un-command-string (shell-quote-argument file) args))) >>> >> Thanks for the report and the patch. >> >> I wonder how many other backends commands are broken for files like tha= t: we basically never shell-quote file names. After some research, it seems that adding a pathspec magic to commands tha= t support this feature is the best solution. Here is a patch that applies vc-git--literal-pathspec, vc-git--literal-pat= hspecs to some git commands in vc-git.el. I have tested all augmented comm= ands in the shell and some in emacs. (defun vc-git--literal-pathspec-inner (pathspec) =C2=A0 "Prepend :(literal) path magic to PATHSPEC." =C2=A0 (concat ":(literal)" pathspec)) (defun vc-git--literal-pathspec (pathspec) =C2=A0 "Prepend :(literal) path magic to PATHSPEC." =C2=A0 (and pathspec (vc-git--literal-pathspec-inner pathspec))) (defun vc-git--literal-pathspecs (pathspecs) =C2=A0 "Prepend :(literal) path magic to PATHSPECS." =C2=A0 (mapcar #'vc-git--literal-pathspec-inner pathspecs)) =01 --------------DFBC9CFE6205859F41BECF80 Content-Type: text/x-patch; name="0001-vc-git-state-fails-for-filenames-with-wildcards.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename*0="0001-vc-git-state-fails-for-filenames-with-wildcards.patch" =46rom eab5ef41ff06471d3cf9387d96a09c70e586b0e6 Mon Sep 17 00:00:00 2001 From: Wolfgang Scherer Date: Fri, 7 Feb 2020 23:24:27 +0100 Subject: [PATCH] vc-git-state fails for filenames with wildcards * lisp/vc/vc-git.el: (vc-git--literal-pathspec-inner), (vc-git--literal-pathspec), (vc-git--literal-pathspecs) new functions to add ":(literal)" pathspec magic. (vc-git-registered), (vc-git-state), (vc-git-dir-status-goto-stage), (vc-git-register), (vc-git-unregister), (vc-git-checkin), (vc-git-find-revision), (vc-git-checkout), (vc-git-revert), (vc-git-conflicted-files), (vc-git-print-log), (vc-git-diff), (vc-git-previous-revision), (vc-git-next-revision), (vc-git-delete-file), (vc-git-rename-file) functions vc-git--literal-pathspec, vc-git--literal-pathspecs applied. =2D-- lisp/vc/vc-git.el | 65 ++++++++++++++++++++++++++++++++++----------------= ----- 1 file changed, 40 insertions(+), 25 deletions(-) diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el index 2caa287..1a38cef 100644 =2D-- a/lisp/vc/vc-git.el +++ b/lisp/vc/vc-git.el @@ -217,6 +217,21 @@ toggle display of the entire list." ;;; BACKEND PROPERTIES +(defun vc-git--literal-pathspec-inner (pathspec) + "Prepend :(literal) path magic to PATHSPEC." + (concat ":(literal)" pathspec)) +;; (vc-git--literal-pathspec-inner "test[56].xx") + +(defun vc-git--literal-pathspec (pathspec) + "Prepend :(literal) path magic to PATHSPEC." + (and pathspec (vc-git--literal-pathspec-inner pathspec))) +;; (vc-git--literal-pathspec nil) +;; (vc-git--literal-pathspec "test[56].xx") + +(defun vc-git--literal-pathspecs (pathspecs) + "Prepend :(literal) path magic to PATHSPECS." + (mapcar #'vc-git--literal-pathspec-inner pathspecs)) + (defun vc-git-revision-granularity () 'repository) (defun vc-git-checkout-model (_files) 'implicit) (defun vc-git-update-on-retrieve-tag () nil) @@ -243,12 +258,12 @@ toggle display of the entire list." (name (file-relative-name file dir)) (str (ignore-errors (cd dir) - (vc-git--out-ok "ls-files" "-c" "-z" "--" name) + (vc-git--out-ok "ls-files" "-c" "-z" "--" (vc-git--= literal-pathspec name)) ;; If result is empty, use ls-tree to check for del= eted ;; file. (when (eq (point-min) (point-max)) (vc-git--out-ok "ls-tree" "--name-only" "-z" "HEA= D" - "--" name)) + "--" (vc-git--literal-pathspec na= me))) (buffer-string)))) (and str (> (length str) (length name)) @@ -330,7 +345,7 @@ in the order given by `git status'." ,@(when (version<=3D "1.7.6.3" (vc-git--program-version)) '("--ignored")) "--")) - (status (apply #'vc-git--run-command-string file args))) + (status (apply #'vc-git--run-command-string (vc-git--literal-path= spec file) args))) (if (null status) ;; If status is nil, there was an error calling git, likely becau= se ;; the file is not in a git repo. @@ -606,28 +621,28 @@ or an empty string if none." (pcase (vc-git-dir-status-state->stage git-state) ('update-index (if files - (vc-git-command (current-buffer) 'async files "add" "--refresh= " "--") + (vc-git-command (current-buffer) 'async (vc-git--literal-paths= pecs files) "add" "--refresh" "--") (vc-git-command (current-buffer) 'async nil "update-index" "--refresh"))) ('ls-files-added - (vc-git-command (current-buffer) 'async files + (vc-git-command (current-buffer) 'async (vc-git--literal-pathspecs= files) "ls-files" "-z" "-c" "-s" "--")) ('ls-files-up-to-date - (vc-git-command (current-buffer) 'async files + (vc-git-command (current-buffer) 'async (vc-git--literal-pathspecs= files) "ls-files" "-z" "-c" "-s" "--")) ('ls-files-conflict - (vc-git-command (current-buffer) 'async files + (vc-git-command (current-buffer) 'async (vc-git--literal-pathspecs= files) "ls-files" "-z" "-u" "--")) ('ls-files-unknown - (vc-git-command (current-buffer) 'async files + (vc-git-command (current-buffer) 'async (vc-git--literal-pathspecs= files) "ls-files" "-z" "-o" "--exclude-standard" "--")) ('ls-files-ignored - (vc-git-command (current-buffer) 'async files + (vc-git-command (current-buffer) 'async (vc-git--literal-pathspecs= files) "ls-files" "-z" "-o" "-i" "--directory" "--no-empty-directory" "--exclude-standard" "--")) ;; --relative added in Git 1.5.5. ('diff-index - (vc-git-command (current-buffer) 'async files + (vc-git-command (current-buffer) 'async (vc-git--literal-pathspecs= files) "diff-index" "--relative" "-z" "-M" "HEAD" "--"))) (vc-run-delayed (vc-git-after-dir-status-stage git-state)))) @@ -861,12 +876,12 @@ The car of the list is the current branch." (when flist (vc-git-command nil 0 flist "update-index" "--add" "--")) (when dlist - (vc-git-command nil 0 dlist "add")))) + (vc-git-command nil 0 (vc-git--literal-pathspecs dlist) "add")))) (defalias 'vc-git-responsible-p 'vc-git-root) (defun vc-git-unregister (file) - (vc-git-command nil 0 file "rm" "-f" "--cached" "--")) + (vc-git-command nil 0 (vc-git--literal-pathspec file) "rm" "-f" "--cach= ed" "--")) (declare-function log-edit-mode "log-edit" ()) (declare-function log-edit-toggle-header "log-edit" (header value)) @@ -933,7 +948,7 @@ It is based on `log-edit-mode', and has Git-specific e= xtensions.") (lambda (value) (when (equal value "yes") (list argument))= ))) ;; When operating on the whole tree, better pass "-a" than ".", sin= ce "." ;; fails when we're committing a merge. - (apply 'vc-git-command nil 0 (if only files) + (apply 'vc-git-command nil 0 (if only (vc-git--literal-pathspecs fi= les)) (nconc (if msg-file (list "commit" "-F" (file-local-name msg-file)) (list "commit" "-m")) @@ -960,7 +975,7 @@ It is based on `log-edit-mode', and has Git-specific e= xtensions.") (coding-system-for-write 'binary) (fullname (let ((fn (vc-git--run-command-string - file "ls-files" "-z" "--full-name" "--"))) + (vc-git--literal-pathspec file) "ls-files" "-z" "--full-name" "--"= ))) ;; ls-files does not return anything when looking for a ;; revision of a file that has been renamed or removed. (if (string=3D fn "") @@ -977,14 +992,14 @@ It is based on `log-edit-mode', and has Git-specific= extensions.") (vc-git-root file))) (defun vc-git-checkout (file &optional rev) - (vc-git-command nil 0 file "checkout" (or rev "HEAD"))) + (vc-git-command nil 0 (vc-git--literal-pathspec file) "checkout" (or re= v "HEAD"))) (defun vc-git-revert (file &optional contents-done) "Revert FILE to the version stored in the git repository." (if contents-done (vc-git-command nil 0 file "update-index" "--") - (vc-git-command nil 0 file "reset" "-q" "--") - (vc-git-command nil nil file "checkout" "-q" "--"))) + (vc-git-command nil 0 (vc-git--literal-pathspec file) "reset" "-q" "-= -") + (vc-git-command nil nil (vc-git--literal-pathspec file) "checkout" "-= q" "--"))) (defvar vc-git-error-regexp-alist '(("^ \\(.+\\)\\> *|" 1 nil nil 0)) @@ -1068,7 +1083,7 @@ This prompts for a branch to merge from." (defun vc-git-conflicted-files (directory) "Return the list of files with conflicts in DIRECTORY." (let* ((status - (vc-git--run-command-string directory "status" "--porcelain" "-= -")) + (vc-git--run-command-string (vc-git--literal-pathspec directory= ) "status" "--porcelain" "--")) (lines (when status (split-string status "\n" 'omit-nulls))) files) (dolist (line lines files) @@ -1140,7 +1155,7 @@ If LIMIT is a revision string, use it as an end-revi= sion." (let ((inhibit-read-only t)) (with-current-buffer buffer (apply 'vc-git-command buffer - 'async files + 'async (vc-git--literal-pathspecs files) (append '("log" "--no-color") (when (and vc-git-print-log-follow @@ -1392,7 +1407,7 @@ This requires git 1.8.4 or later, for the \"-L\" opt= ion of \"git log\"." (if vc-git-diff-switches (apply #'vc-git-command (or buffer "*vc-diff*") 1 ; bug#21969 - files + (vc-git--literal-pathspecs files) command "--exit-code" (append (vc-switches 'git 'diff) @@ -1475,7 +1490,7 @@ This requires git 1.8.4 or later, for the \"-L\" opt= ion of \"git log\"." (let* ((fname (file-relative-name file)) (prev-rev (with-temp-buffer (and - (vc-git--out-ok "rev-list" "-2" rev "--" fname) + (vc-git--out-ok "rev-list" "-2" rev "--" (vc-gi= t--literal-pathspec fname)) (goto-char (point-max)) (bolp) (zerop (forward-line -1)) @@ -1503,7 +1518,7 @@ This requires git 1.8.4 or later, for the \"-L\" opt= ion of \"git log\"." (current-rev (with-temp-buffer (and - (vc-git--out-ok "rev-list" "-1" rev "--" file) + (vc-git--out-ok "rev-list" "-1" rev "--" (vc-git--literal-pa= thspec file)) (goto-char (point-max)) (bolp) (zerop (forward-line -1)) @@ -1515,7 +1530,7 @@ This requires git 1.8.4 or later, for the \"-L\" opt= ion of \"git log\"." (and current-rev (with-temp-buffer (and - (vc-git--out-ok "rev-list" "HEAD" "--" file) + (vc-git--out-ok "rev-list" "HEAD" "--" (vc-git--literal= -pathspec file)) (goto-char (point-min)) (search-forward current-rev nil t) (zerop (forward-line -1)) @@ -1525,10 +1540,10 @@ This requires git 1.8.4 or later, for the \"-L\" o= ption of \"git log\"." (or (vc-git-symbolic-commit next-rev) next-rev))) (defun vc-git-delete-file (file) - (vc-git-command nil 0 file "rm" "-f" "--")) + (vc-git-command nil 0 (vc-git--literal-pathspec file) "rm" "-f" "--")) (defun vc-git-rename-file (old new) - (vc-git-command nil 0 (list old new) "mv" "-f" "--")) + (vc-git-command nil 0 (vc-git--literal-pathspecs (list old new)) "mv" "= -f" "--")) (defvar vc-git-extra-menu-map (let ((map (make-sparse-keymap))) =2D- 2.7.4 --------------DFBC9CFE6205859F41BECF80-- From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 11 18:01:30 2020 Received: (at 39452) by debbugs.gnu.org; 11 Feb 2020 23:01:30 +0000 Received: from localhost ([127.0.0.1]:57710 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j1eX3-00030T-Th for submit@debbugs.gnu.org; Tue, 11 Feb 2020 18:01:30 -0500 Received: from mail-wm1-f66.google.com ([209.85.128.66]:53914) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j1eX2-00030H-IP for 39452@debbugs.gnu.org; Tue, 11 Feb 2020 18:01:29 -0500 Received: by mail-wm1-f66.google.com with SMTP id s10so5833862wmh.3 for <39452@debbugs.gnu.org>; Tue, 11 Feb 2020 15:01:28 -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=6KbS6UCi+P3v40XtINg6DuCcToKm1BQ0sltEYv5RJec=; b=fLanfL6MxVnDCapvU6eC+3BIzp3I/+mP4an03TI10CdqEH0KnYtObJ2TodlVfME6ZW txEnJE0PtuAyH4ltqicXJb2aK+V69gQtumPyocYEmu39qw7LSxnBANNVUVgkoM2s/j0P NGsPGyYq5ykCKC7+VXvoUu0UZEkUiL7gZW+ZZ6YoejqrLVSRGdNUNM0zYmO1rj9Ce6lC ePwVNxOil3c+ruDnsGJS126gYEFIxYpmvJZ8K5j0Ge6B/XXC9OalXzoaOhwTjab1OM6D dKWbqWoHNYZWMtBIkKfiEXsGRyrWzryPUMMNn93YNZYJ5T1V3ihgUpID5LghNZ9Ud8/E 9NOA== 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=6KbS6UCi+P3v40XtINg6DuCcToKm1BQ0sltEYv5RJec=; b=fC488oFG0IgjCa+KAoB4rrlgGkjApATpNpch/HuTRZuW2sfzejASAFK9Zfq0P8dbFL OQgPR3CMBb94dxxSHUqPHOD6VtAp6hd4SBnqY2PM+HO21/B9KlwJm70BP/ZbMyGTvtqH SalzuYyU8kua7hH+3e0pYLvTcPfzOOuGIM/nR4BcoLVkzDQbwCdtP2mlBkqQfH6xjnvZ mNHW6UYAuEPofBMNZZN9JE7QgDEQDmDOXCucTzY7IAujOgPMjFlU4h8kVMjGc64FFS1d lhdnl0BtnSp3/yAWY+dIpx9toIPFkTT2q2xIQIp/3MVwaJ2VodXjAkCQtzvVPaWieP7F 6GFw== X-Gm-Message-State: APjAAAUFKHx7+Rc4aSzOhqqajb/Bf7Lf0q8eZ/Opz0mmAThYeK9hSVev K/ywzPU5/GM5xoq3k421pFg= X-Google-Smtp-Source: APXvYqzy5navlx+QJgmxSaXv5ash0SftQQBHIeI4jdhkD5ABCOuc4inEOwdRFhuqe6p0057XGDKGRg== X-Received: by 2002:a05:600c:2215:: with SMTP id z21mr8276737wml.55.1581462082694; Tue, 11 Feb 2020 15:01:22 -0800 (PST) Received: from [192.168.0.3] ([66.205.73.129]) by smtp.googlemail.com with ESMTPSA id s1sm6859137wro.66.2020.02.11.15.01.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Feb 2020 15:01:21 -0800 (PST) Subject: Re: bug#39452: [PATCH] vc-git-state fails for filenames with wildcards To: Noam Postavsky References: <83h802g77h.fsf@gnu.org> <8f427281-510c-30c3-995f-364e22d9c1e2@yandex.ru> <85y2texxso.fsf@gmail.com> From: Dmitry Gutov Message-ID: <52f47a82-b93e-d9c2-ee94-752b289d4b96@yandex.ru> Date: Wed, 12 Feb 2020 01:01:20 +0200 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: <85y2texxso.fsf@gmail.com> 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: 39452 Cc: 39452@debbugs.gnu.org, Wolfgang.Scherer@gmx.de X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) On 07.02.2020 16:43, Noam Postavsky wrote: > Dmitry Gutov writes: > >> It's not so simple. FILE already goes through call-process. But Git >> expects a pathspec, not just a file name. So if it's a glob, it is >> expanded. > > You can pass --literal-pathspecs to tell git not to expand. Magit does > this. But there is a downside due to the way git implements it, which > is by setting an environment variable: it affects all subprocesses git > calls, including git-hook scripts which tends to trip people up. I wonder how bad the latter problem is. After all, even if it happens, it *can* be worked around in the same scripts. The patch is much smaller than the proposed alternative: diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el index 61e6c642d1..bbfdbfbe52 100644 --- a/lisp/vc/vc-git.el +++ b/lisp/vc/vc-git.el @@ -1751,6 +1751,7 @@ vc-git-command (process-environment (append `("GIT_DIR" + "GIT_LITERAL_PATHSPECS=1" ;; Avoid repository locking during background operations ;; (bug#21559). ,@(when revert-buffer-in-progress-p @@ -1785,6 +1786,7 @@ vc-git--call (process-environment (append `("GIT_DIR" + "GIT_LITERAL_PATHSPECS=1" ;; Avoid repository locking during background operations ;; (bug#21559). ,@(when revert-buffer-in-progress-p And if Magit does it, it's probably okay for most of VC users too. From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 12 10:24:38 2020 Received: (at 39452) by debbugs.gnu.org; 12 Feb 2020 15:24:38 +0000 Received: from localhost ([127.0.0.1]:58945 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j1tsT-00033F-O2 for submit@debbugs.gnu.org; Wed, 12 Feb 2020 10:24:37 -0500 Received: from mail-qt1-f194.google.com ([209.85.160.194]:43562) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j1tsQ-000332-RH for 39452@debbugs.gnu.org; Wed, 12 Feb 2020 10:24:36 -0500 Received: by mail-qt1-f194.google.com with SMTP id d18so1828370qtj.10 for <39452@debbugs.gnu.org>; Wed, 12 Feb 2020 07:24:34 -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 :user-agent:mime-version; bh=V6Tnypzqvz/Ga9wtW44Y9+fsDAdf+VkZknBDY9g6bM8=; b=UdxN3i4WkeRcIIgmBcNSrL4wkbnnUkW7JC+6ber/OaZKuKCUv4/7tMJ1BkFfhd7fW3 7y7z/baNdHd9IUqh4YKV1+95VBvnpn0LoXO8+Kf77zsN2wsoUzZ/32Z0RKRSoQhPXNMR 6v3X/+0JDrpmFRNu/f4SbJsSpiaOXXuLWCHCUpx3Uqewcm4laMg1WkDINHTO7dNHJdW5 Htql/olaOWlaujM7Tk4wD2eK0vnorOlBkYeXr/iqwsTJpBhx4L3q+5YcDaQ08FS41zf2 vzt3cukIP0C5JSE4mfBKVhOsacol4WaBZEWp2grk45x7gK591hx9JOoIWfE/9Vb/M9d7 L9mA== 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:user-agent:mime-version; bh=V6Tnypzqvz/Ga9wtW44Y9+fsDAdf+VkZknBDY9g6bM8=; b=dCs08HasbzTCiWuMueegtidV2Y16OmLpLZt5Faw2a5a27x0FocPXaWWRJGsGKFNvhe J21zKxJZG3IgRQGi4TWyXe6i/lwEA0ZXBNp26JGTySZbHIyW0l6HLwh0aR4e+ycmRjj6 b0ZAN1mKbvxizUHezZAlt8anri9I6m9SVxRW5JVicRitgtFCsbM2l8PBTS5clNy0j3j6 DU9UXzZ0kjYolhWSE4JOX8Fdu/FYsgcnII/wTCvl7DLDYAaZUl+FmwO2oHXZ6JE6r2cp S+C/Lo2wdLbAsRGwYkOp/74ZyuSU/ABFKauf7nv+qs8TFzu6OkZdFA46NWRRNv8AzUxs J3Iw== X-Gm-Message-State: APjAAAUmSQmncay0GS/GagGUzqnH0c/PSEbZ3lwDpXkGAMsJJA7nH4Rk X1RVyvhoqSE6eJ420q5/wb0= X-Google-Smtp-Source: APXvYqw8BdS0+s9un5xB5LFhfPHzvkDIQnX8RW/w9Cvkd1FWc5DWqe3wDljhGPA6BaQyugwZ0SNLIA== X-Received: by 2002:ac8:4914:: with SMTP id e20mr7428166qtq.199.1581521069183; Wed, 12 Feb 2020 07:24:29 -0800 (PST) Received: from vhost2 (CPE001143542e1f-CMf81d0f809fa0.cpe.net.cable.rogers.com. [99.230.38.42]) by smtp.gmail.com with ESMTPSA id y21sm329540qto.15.2020.02.12.07.24.27 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 12 Feb 2020 07:24:28 -0800 (PST) From: Noam Postavsky To: Dmitry Gutov Subject: Re: bug#39452: [PATCH] vc-git-state fails for filenames with wildcards References: <83h802g77h.fsf@gnu.org> <8f427281-510c-30c3-995f-364e22d9c1e2@yandex.ru> <85y2texxso.fsf@gmail.com> <52f47a82-b93e-d9c2-ee94-752b289d4b96@yandex.ru> Date: Wed, 12 Feb 2020 10:24:28 -0500 In-Reply-To: <52f47a82-b93e-d9c2-ee94-752b289d4b96@yandex.ru> (Dmitry Gutov's message of "Wed, 12 Feb 2020 01:01:20 +0200") Message-ID: <85lfp7ygk3.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (windows-nt) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 39452 Cc: 39452@debbugs.gnu.org, Wolfgang.Scherer@gmx.de X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Dmitry Gutov writes: > On 07.02.2020 16:43, Noam Postavsky wrote: >> Dmitry Gutov writes: >> >>> It's not so simple. FILE already goes through call-process. But Git >>> expects a pathspec, not just a file name. So if it's a glob, it is >>> expanded. >> >> You can pass --literal-pathspecs to tell git not to expand. Magit does >> this. But there is a downside due to the way git implements it, which >> is by setting an environment variable: it affects all subprocesses git >> calls, including git-hook scripts which tends to trip people up. > > I wonder how bad the latter problem is. After all, even if it > happens, it *can* be worked around in the same scripts. Yes, it's common enough to have a FAQ for it. https://magit.vc/manual/magit/My-Git-hooks-work-on-the-command_002dline-but-not-inside-Magit.html From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 13 13:34:52 2020 Received: (at 39452) by debbugs.gnu.org; 13 Feb 2020 18:34:52 +0000 Received: from localhost ([127.0.0.1]:60433 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j2JK8-0006FW-7S for submit@debbugs.gnu.org; Thu, 13 Feb 2020 13:34:52 -0500 Received: from mout.gmx.net ([212.227.17.21]:58689) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j2JK5-0006FG-Mk for 39452@debbugs.gnu.org; Thu, 13 Feb 2020 13:34:50 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1581618883; bh=532uUh+OH7/n6/EC0YXlIgR9L6KiCdc2V7BvD5VIKHw=; h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To; b=RMg3UAy1ooHlsDgYa0hOo6CqOXQ+OTiwCewUt2j0Gg7jno2vVGC0cdmN/hAmgKxwP BQY+TEG1tX6upWj3oGQXzqqDB4wB6MCJLom3cMEaOK/K/x2GP8h55tTlyVAotKmNDk 1HD7nKte+lrPbm165eaPVIskp++cHZZKYb4zxfhk= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from sheckley.simul.de ([87.160.210.52]) by mail.gmx.com (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MeU0q-1jaGYx0Agm-00aVMB; Thu, 13 Feb 2020 19:34:43 +0100 Received: from [127.0.0.1] (sheckley.simul.de [127.0.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by sheckley.simul.de (Postfix) with ESMTPSA id 5F7F219431D6; Thu, 13 Feb 2020 19:34:42 +0100 (CET) Subject: Re: bug#39452: [PATCH] vc-git-state fails for filenames with wildcards To: Dmitry Gutov , Noam Postavsky References: <83h802g77h.fsf@gnu.org> <8f427281-510c-30c3-995f-364e22d9c1e2@yandex.ru> <85y2texxso.fsf@gmail.com> <52f47a82-b93e-d9c2-ee94-752b289d4b96@yandex.ru> From: Wolfgang Scherer Openpgp: preference=signencrypt Autocrypt: addr=Wolfgang.Scherer@gmx.de; prefer-encrypt=mutual; keydata= xsDiBEb46IgRBACMHOAb1KNo1Ylk+ebri+4R+bG4tyKlqBlrpv8D9/ZwRdXSGt+0DyCHoaAd 7KW7noHapLe87DunABOjKG4nqTGv+dRiWuUBlp3I4aYRFDVa3Da+XnIYkMHKqhK59VEHQCdp Km42nuLS7TS+n99at9YwzTG6VBdOlBKTlRFngOjVLwCg1RGXJ6X3EjS1FKCQeXziURVpWlkD /2zY6Ayhxi62TS84VjikXrrmjXykAAaAmMVEyKKYb9L5pGlqiZz9g/K9xw1EUoZTYuaufquD v4rAGR58K/3V4CYfJLEeshMWiaXHvMmlxMznlG16/um4MvmR8B3r+cx0nOPK1JBdD2qrkNnF Mw8FB+zouLFB4Gt2IUC5IlOmZ8OQA/4qdU53CItzWsCr9Nux4L0qUlRweSmCnV8xGQ2wP5XI MawIQxxREvSrsYDG8cNnYETMg4iQFfIktwAoxCJvuFAwIB6ZxHGF4FcEZm64CXc2u7CmFLqt rVhXhIfMz9oEYC+HhGczGamn9ofbGTFd2hJEtPcQgWNR4f7+aKknmi2+OM0fV29sZmdhbmcg U2NoZXJlciA8d3NAc3ctYW10LndzPsJhBBMRAgAhBQJYmz3YAhsjBQsJCAcCBhUICQoLAgQW AgMBAh4BAheAAAoJEIUCr3Gr112VZZoAoLTBSTp1qGuNhLdXY04iaWCMYmHCAJ4kHPtQ6nTw kEq9qCHgVgXDaY7wjs7ATQRG+OiIEAQAhi0wjcxvA4tychg2NQuwBIf9LX/46l+74+QbewCn a4a+mw/9s5KYqLGtYMuu3/KYq9yBd53OYc7LWTLMxsGOIATSOQRhdCKYW1AanupYrC/bKNW/ 8i2QEXc7LIeYiaII0TkVdQTVZxrg9kKLQ+Vf6z04Lbfv91sVCkHKI9jxgVMAAwUD/0mkDeN0 tllPH+NOjbkkqlOj6UOwzwIYgXmALhuAEFGXVLM2HfRV9TtJa2OoGZiuhyGXat3Jl9QK9NNv d/J4HSal93ZHWstPU4YIRc5uhJ1eeWwKsfTmPvbZXMKMkh+hBBJ39SZnmxfoeUzkK0EQNE2p PZDyjAlz03qOx6D0DHnZwkkEGBECAAkFAkb46IgCGwwACgkQhQKvcavXXZU8PwCdGmUH5mbh dsLYyx7qthe4hOWnW54AoJQMfmHP4uUI6ji8VkdlvO8LKtLP Message-ID: Date: Thu, 13 Feb 2020 19:34:42 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.1 MIME-Version: 1.0 In-Reply-To: <52f47a82-b93e-d9c2-ee94-752b289d4b96@yandex.ru> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Language: de-DE X-Provags-ID: V03:K1:AQ+TvhaaPP3ZG7Emv2J0Fh9nJDLy/b3WQ3wX2iqcPX+WaywEy05 r8Mg2/ityRdhVGLsbWinBlohTq6IBFfen6s/GIAuXu/hHgjsIU4en6eGiXuGRnqTCF9EStY NkYuHYOubCpAA0bHLy+Zr0kYDi8lLgywAmz9Pqr5Qqy9IKeLjjXkTYAsbiqDUCl+kaNPFtv zU5Ww5YMNQSORta0MofWg== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:Iwo8l9vCqV8=:bn+yNhikrCSMEFTNcvQ1l8 w9fOyE8py36PwxWRXCaWJgvg98GrQLcWTTNc45rw0su1oDiwpqEKGYOvSZhaekglZA9CogGgO iTJjF7hnAlBMVtXUiFZi9NQACZJXK4XS28MN29lX5DRTab6V6MLTg/R7GZGqX/7CDAQ+xviSD xVWjZwWrQKJZVA1Ss9lPWTgDDldM6vNwW2I767omyS9Bpw1zAHw5mgQp8msGPfHjz9GQDCwE3 IhtIxfI3SXUUHcK9puLVg4Y4CvxkuN34ybrhbcpG2cYCqBLA7zEUOyVlqd6ihgcPvkEXcYHXs eaMcfAm5iGSwM50eqJiIf/poCf0PGumv2DPpaUcZ14gcur22UDfCRUq0ZWpwaZf/hpSYeatAJ oT0StNK2E57A31inTz5rdBQdq3WSxIVxMsfUhFCoMiHVLmR/3u+i85UbGENLw27m2o9VVLVvM 6cC61jUUK4nhFvZ090TLHsRzem/8Lg7v5HIym42U755dXut8eC4rwO0YZDMQmdrpTOwGjayYc AKcxRALF0qRuQbJvLt9tEpOdGLaSOEbpZvvEu/CLVPW/MsTf16DBxAunm/JbS5LPCmn54dlag svdgsaX/LkeFT5INyK12HM/f9sScbLWp/b8qrVhQHPePNEnVk4XQEVhYrqfg6vvC49tLyn8QK MQ7xX+d9uTKU7imQ4sscyJafT6SzL1TIrCMjPQDsDEbyfLqI4knNWlqA/rd9S2WYO0O7BQKrl bpMmnlbQf/7dS6Hx3cXk2uqlZ94GGtlPEwCoiVEbJufeMPHFDEqBFBhOTkvSK3hcGqUMwSVhK qzI/J7SQ5AoEWkAQ4on9upSAauLpjBS7HOdQrqGl+wjIWQWmWs1bD3TM6AJG0OWIxXGapv6dq W60bNiokc8ZU9VTibOghlwqAm3bglGC/oAyyYPsu9YBnLnTHoJ69UTvjuzxOBdv8190I2wgjI A+98MA4lzc19TYPfFYPPkPy375Lz7+edzAs+gHzLDtp2RHm7ikgDHVbV9WaR7yDc6eicsurua /xrlaWM+5mLr+PtJWXoF12dtzpYW4TCuiT66I4FvwsyZtM3VAdeE2Z8o1+Jc4KQECjRusNJ6v mYUQ2Jhm6vEXj1Y2xSfiSLeIseUMysSvwtwA6a3aukHxB6nvulXHc0MwppuO+brLNDv2K+cQS 7awQTjSYtvkPLNi3mW5gsYSqbpFC11tMINNIh7TtANb6yuVKGCPvBP0hdcfcJ4tfmBi4eyEdK JNrMhTFVuDfjNHrMF X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 39452 Cc: 39452@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Am 12.02.20 um 00:01 schrieb Dmitry Gutov: > The patch is much smaller than the proposed alternative: The patch works as expected. > And if Magit does it, it's probably okay for most of VC users too. It might be worth documenting in the manual, since the problem comes up quite a lot in issues and Stackoverflow. From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 13 18:24:02 2020 Received: (at 39452) by debbugs.gnu.org; 13 Feb 2020 23:24:02 +0000 Received: from localhost ([127.0.0.1]:60639 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j2Npy-0002G3-1R for submit@debbugs.gnu.org; Thu, 13 Feb 2020 18:24:02 -0500 Received: from mail-wm1-f67.google.com ([209.85.128.67]:37467) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j2Npv-0002FZ-V0 for 39452@debbugs.gnu.org; Thu, 13 Feb 2020 18:24:00 -0500 Received: by mail-wm1-f67.google.com with SMTP id a6so8698053wme.2 for <39452@debbugs.gnu.org>; Thu, 13 Feb 2020 15:23: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=at+oB8MiIGYdXvrSqd7TUftXXDYE0x/ej6ieUzFcank=; b=Qkurzrqb4g4E0Wm6LOTMgOEDAXc2ax35AvxPm15eXuwmpzCNTlmaXXTVsV2f1UZ6Gp EU2s6k+AbNxkOC3HltwuoYLj5HtF5+PvTpHCzyuA2s1Z5FofORiqdXvv2UgwV54E0md3 Qb0gclZV/J1SLIOi6HPICnhg2UOH0G03xPP46gdtag9kyA+8qT6LlzFFpMzWOv0XuxjY NN7RlQWZT+sj3yRo+/YdtXsnXdkTFkLq3sVXgKpXsnxoyNURJpuP2dAVqgNEOXAkVM/T bYZ6VrgBGxaD3tnaqHeWy9USwS/Xzk4oyyvzizxVOw0ZtLPQWC+GDfOSOOl9GA8SyIuZ kmWw== 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=at+oB8MiIGYdXvrSqd7TUftXXDYE0x/ej6ieUzFcank=; b=s/ozRI1VYHoDANNKS9Yrd5DUBUg4m/2JLKytTXtsBwA9zDK2zC1bFQA5tnj+3yVJH9 3rUc+VHAwfuEZXCwJtLU8gi3xjJVfrSdZUkPwirhbN+J2Djv3wFear+xYoV3j967ZbMj qcBV1Lcuqd0+eOlLHkeDoyI8jUTmg8SS/krCcDhYYE2Q8aT+dVNdPKFDbPIxO7qSp9gt nPUayCCbKXuQOAE3McmLi4GsLLNKomd9FC7WR1XIrqCoMvuCaZsGwpaFrmwnxue5DK0i jAYj4ENUn1xibRq87DsFOGCMl09Q35/SOSXYpoR0ptXH1Ul7+eIRPMgHIA91qjdrnyN2 yrIQ== X-Gm-Message-State: APjAAAX7V/lIS79bGKsvAQ0mDsMq+Az0RHyvwUDoZfvYRmn1g5eNpe7Y FfyHvYK6qGVXTgMfDxM0c5Vt1fqV X-Google-Smtp-Source: APXvYqyzJu9ZAas+9iC9YU6FagIBfP2nBMPT9NCD69xESW+hspDJX9I1Z3361E08g+2rBBjz2dbGyQ== X-Received: by 2002:a7b:cc6a:: with SMTP id n10mr422044wmj.170.1581636233104; Thu, 13 Feb 2020 15:23:53 -0800 (PST) Received: from [192.168.0.3] ([66.205.73.129]) by smtp.googlemail.com with ESMTPSA id o15sm4804439wra.83.2020.02.13.15.23.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 13 Feb 2020 15:23:52 -0800 (PST) Subject: Re: bug#39452: [PATCH] vc-git-state fails for filenames with wildcards To: Wolfgang Scherer , Noam Postavsky , Eli Zaretskii References: <83h802g77h.fsf@gnu.org> <8f427281-510c-30c3-995f-364e22d9c1e2@yandex.ru> <85y2texxso.fsf@gmail.com> <52f47a82-b93e-d9c2-ee94-752b289d4b96@yandex.ru> From: Dmitry Gutov Message-ID: Date: Fri, 14 Feb 2020 01:23:50 +0200 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: 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: 39452 Cc: 39452@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) On 13.02.2020 20:34, Wolfgang Scherer wrote: >> And if Magit does it, it's probably okay for most of VC users too. > > It might be worth documenting in the manual, since the problem comes up quite a lot in issues and Stackoverflow. You mean the problem inside git hooks, if such solution is applied? Weird how I never seen it mentioned before. Anyway, at this point I'd rather hear more opinion. Eli, what do you think is better, applying a more verbose fix (which prepends stuff to every file name) and spending some of our complexity budged on that. Or using the simple fix and documenting the git hooks erratum in the manual (or somewhere else). I'm inclining toward the latter, esp. considering that the problem should be familiar to Magit users already, and thus the fix is prominently documented on the Internet. From debbugs-submit-bounces@debbugs.gnu.org Fri Feb 14 04:38:02 2020 Received: (at 39452) by debbugs.gnu.org; 14 Feb 2020 09:38:02 +0000 Received: from localhost ([127.0.0.1]:60865 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j2XQA-0000DP-GM for submit@debbugs.gnu.org; Fri, 14 Feb 2020 04:38:02 -0500 Received: from eggs.gnu.org ([209.51.188.92]:36930) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j2XQ8-0000Cw-QY for 39452@debbugs.gnu.org; Fri, 14 Feb 2020 04:38:01 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:45761) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1j2XQ3-0004wJ-5e; Fri, 14 Feb 2020 04:37:55 -0500 Received: from [176.228.60.248] (port=4782 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1j2XQ2-0004gG-Ed; Fri, 14 Feb 2020 04:37:54 -0500 Date: Fri, 14 Feb 2020 11:37:57 +0200 Message-Id: <83d0ahpkzu.fsf@gnu.org> From: Eli Zaretskii To: Dmitry Gutov In-reply-to: (message from Dmitry Gutov on Fri, 14 Feb 2020 01:23:50 +0200) Subject: Re: bug#39452: [PATCH] vc-git-state fails for filenames with wildcards References: <83h802g77h.fsf@gnu.org> <8f427281-510c-30c3-995f-364e22d9c1e2@yandex.ru> <85y2texxso.fsf@gmail.com> <52f47a82-b93e-d9c2-ee94-752b289d4b96@yandex.ru> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 39452 Cc: npostavs@gmail.com, 39452@debbugs.gnu.org, Wolfgang.Scherer@gmx.de X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > Cc: 39452@debbugs.gnu.org > From: Dmitry Gutov > Date: Fri, 14 Feb 2020 01:23:50 +0200 > > Eli, what do you think is better, applying a more verbose fix (which > prepends stuff to every file name) and spending some of our complexity > budged on that. > > Or using the simple fix and documenting the git hooks erratum in the > manual (or somewhere else). > > I'm inclining toward the latter, esp. considering that the problem > should be familiar to Magit users already, and thus the fix is > prominently documented on the Internet. I also tend towards the latter, especially since (AFAIU) we don't prevent users from using the Git magic signatures in file-name specs (where it makes sense), in which case we'd need some code to detect and combine signatures. From debbugs-submit-bounces@debbugs.gnu.org Fri Feb 14 08:59:52 2020 Received: (at 39452) by debbugs.gnu.org; 14 Feb 2020 13:59:52 +0000 Received: from localhost ([127.0.0.1]:32781 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j2bVX-0000Bf-Uq for submit@debbugs.gnu.org; Fri, 14 Feb 2020 08:59:52 -0500 Received: from mail-ed1-f65.google.com ([209.85.208.65]:37221) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j2bVV-0000BS-R5 for 39452@debbugs.gnu.org; Fri, 14 Feb 2020 08:59:50 -0500 Received: by mail-ed1-f65.google.com with SMTP id df17so4547744edb.4 for <39452@debbugs.gnu.org>; Fri, 14 Feb 2020 05:59:49 -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=ruSy6j1mblwkP+6eqkiCuhXN1vAROGBxLB1dI0AZ674=; b=pJOvL5bk3rfsBjGj8zoZnp20OTSoaN8y6Pwu9lxCK0TKX6sLvieYJUBQd9BGgkCzFy Mey1/AWy6qJT/yNntKcamxIvfLPw6ayl+WhPh67NgjtnnEBxSrPzGrRztXYIF7LAzerN K4npeUSV5cMWjFEmAteZuwpbtHTHrwisCUbMnPayxdWCWqw+d9magnbmskzmJNLZ1AfF iQMmRzimMQcbKEhf266W6sJonkt4wL8UMT04Lr9peO3O87Zrt9p06KpQ9Sl8tPZ7ewkh 8A4EmEirxDj53s76DmhD57gJEEJZCVizlAklH2mJAZNTyrEszVHbhoumZEQevRTSJzIQ 3vWQ== 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=ruSy6j1mblwkP+6eqkiCuhXN1vAROGBxLB1dI0AZ674=; b=Ze5ZdenGYFT9Nf4f4kQOtQoJslaKvMDF+24A2D1odD80kmDrpuFXeIeqgzbUhEQYHX A3tgSehbstipwY3u6C67gRFV59ThVpND54JYcCGI++mngMWsFYnKdkOdAhTvAtZnC/D+ 5srJ1BHFgXBhhhhStAiYmQAp8IsFkbH6NDBfwhNZnCsCOeD5i09hM0Z+xOp0kOFtHbi/ RrP7hWPbOqU9B4vlPpBQgBAphHb3wm9E6egJ30CfTU1XJ/VSx/3SAOVuEJIdFZbXtCc7 WwSbNLM1ipUKS6x5I41dyePfg0kqvKJf6KvRqpcosnN55ac6uD6WrGZVSGTPYLROGIXr 1Yvw== X-Gm-Message-State: APjAAAXhfB1tyEIPu9RPRFoqiSMV4ASfZa7gt9wfKG5fgpAPC2//4Afx Zgz2McK6RnN7b0+GRupfggc= X-Google-Smtp-Source: APXvYqx2t+nGmYI8H7Z6vB9rCAlBiVWKy7nHUdYeHCEjo3tuKLc2T6TkMnPVF8tampCvBuwsCVa5uw== X-Received: by 2002:a17:906:f915:: with SMTP id lc21mr3101508ejb.360.1581688783853; Fri, 14 Feb 2020 05:59:43 -0800 (PST) Received: from [192.168.0.155] ([109.110.245.170]) by smtp.googlemail.com with ESMTPSA id i21sm383639edj.33.2020.02.14.05.59.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 14 Feb 2020 05:59:43 -0800 (PST) Subject: Re: bug#39452: [PATCH] vc-git-state fails for filenames with wildcards To: Eli Zaretskii References: <83h802g77h.fsf@gnu.org> <8f427281-510c-30c3-995f-364e22d9c1e2@yandex.ru> <85y2texxso.fsf@gmail.com> <52f47a82-b93e-d9c2-ee94-752b289d4b96@yandex.ru> <83d0ahpkzu.fsf@gnu.org> From: Dmitry Gutov Message-ID: <6f06f4c8-17c0-31a7-a6d8-e40686b1e987@yandex.ru> Date: Fri, 14 Feb 2020 15:59:41 +0200 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: <83d0ahpkzu.fsf@gnu.org> 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: 39452 Cc: npostavs@gmail.com, 39452@debbugs.gnu.org, Wolfgang.Scherer@gmx.de X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) On 14.02.2020 11:37, Eli Zaretskii wrote: > I also tend towards the latter, especially since (AFAIU) we don't > prevent users from using the Git magic signatures in file-name specs > (where it makes sense), in which case we'd need some code to detect > and combine signatures. Could you clarify? What commands and backend actions expect or intentionally allow file-name specs instead of file-names verbatim? Aside from vc-ignore, I suppose. Which won't be affected either way. From debbugs-submit-bounces@debbugs.gnu.org Fri Feb 14 09:14:46 2020 Received: (at 39452) by debbugs.gnu.org; 14 Feb 2020 14:14:46 +0000 Received: from localhost ([127.0.0.1]:32800 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j2bjx-0000Yk-HR for submit@debbugs.gnu.org; Fri, 14 Feb 2020 09:14:46 -0500 Received: from eggs.gnu.org ([209.51.188.92]:46745) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j2bjw-0000YY-9b for 39452@debbugs.gnu.org; Fri, 14 Feb 2020 09:14:44 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:33074) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1j2bjq-0004gu-Q3; Fri, 14 Feb 2020 09:14:38 -0500 Received: from [176.228.60.248] (port=1925 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1j2bjq-00039f-2u; Fri, 14 Feb 2020 09:14:38 -0500 Date: Fri, 14 Feb 2020 16:14:41 +0200 Message-Id: <83y2t5ntm6.fsf@gnu.org> From: Eli Zaretskii To: Dmitry Gutov In-reply-to: <6f06f4c8-17c0-31a7-a6d8-e40686b1e987@yandex.ru> (message from Dmitry Gutov on Fri, 14 Feb 2020 15:59:41 +0200) Subject: Re: bug#39452: [PATCH] vc-git-state fails for filenames with wildcards References: <83h802g77h.fsf@gnu.org> <8f427281-510c-30c3-995f-364e22d9c1e2@yandex.ru> <85y2texxso.fsf@gmail.com> <52f47a82-b93e-d9c2-ee94-752b289d4b96@yandex.ru> <83d0ahpkzu.fsf@gnu.org> <6f06f4c8-17c0-31a7-a6d8-e40686b1e987@yandex.ru> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 39452 Cc: npostavs@gmail.com, 39452@debbugs.gnu.org, Wolfgang.Scherer@gmx.de X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > Cc: npostavs@gmail.com, 39452@debbugs.gnu.org, Wolfgang.Scherer@gmx.de > From: Dmitry Gutov > Date: Fri, 14 Feb 2020 15:59:41 +0200 > > On 14.02.2020 11:37, Eli Zaretskii wrote: > > I also tend towards the latter, especially since (AFAIU) we don't > > prevent users from using the Git magic signatures in file-name specs > > (where it makes sense), in which case we'd need some code to detect > > and combine signatures. > > Could you clarify? What commands and backend actions expect or > intentionally allow file-name specs instead of file-names verbatim? Any command that prompts for a file name, I guess. vc-delete-file and vc-rename-file come to mind. But my comment was more general: we don't plan on not supporting Git specs in file names, do we? From debbugs-submit-bounces@debbugs.gnu.org Fri Feb 14 09:40:15 2020 Received: (at 39452) by debbugs.gnu.org; 14 Feb 2020 14:40:15 +0000 Received: from localhost ([127.0.0.1]:32806 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j2c8d-00018f-82 for submit@debbugs.gnu.org; Fri, 14 Feb 2020 09:40:15 -0500 Received: from mail-ed1-f67.google.com ([209.85.208.67]:40156) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j2c8b-00018M-0e for 39452@debbugs.gnu.org; Fri, 14 Feb 2020 09:40:13 -0500 Received: by mail-ed1-f67.google.com with SMTP id p3so11446748edx.7 for <39452@debbugs.gnu.org>; Fri, 14 Feb 2020 06:40:12 -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=oxQpa2rXjFsduJLzNgNLJRPKYjOl3um3rU1kM1Kjj+8=; b=rMYSN/2UDC7TVZ99kQAdukXx8A8YmQ0whiTd8Ywja4qINqHNz2rYrX05JToa3ItolB IrUFTxfN+68mLXGRYYdu6Qry1r6hI3FA68aU00udi7fXBqK6rWQqNOljI8o7q8ylFsqP H7EmU2cwxV0Mmli9I6Y5Wmtov0mnFHwFoIZnBcDmT793dWS+FaGjAxKm5t8ginkUUSM8 RBmrsJnoJ0on7dEDLcQfgOaablwQyQKwQDOh27k+VGJZWeib0czOVX7Ma/zhLlFhk3yd tc41J67Ap+bugXsiijdURhHPXEU96OZzBs1/wXdEmHlYBqGxI2UaKFU5UlVD7Jq+rHoH ewHg== 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=oxQpa2rXjFsduJLzNgNLJRPKYjOl3um3rU1kM1Kjj+8=; b=VcApVVFAyzK0lMwkDNFdjCvdwfmnfiQHr2ZesejgdzVCIR3FIt92JH84+tbmkwbdfe CqsfXOUM77goKT4x31EbBCJVWqnJphzJMT7W898sAJgpPSZnvSslf4pWuxqzDJyoqgSR VPHAPWDfPqV+W80ZSm6ENjIYBKhsubLJbkG3ou15unnhKcBPoN6Rs3uoOTuZXRc6DUG7 17funHOaZwpxDruJNsA8dZqXjDblq72gbwz0l3HF2SUky6fdxLAERcMuiPnA523Cg+M9 8wqr5eBsV4peYNIX0M+NvsF+eGfRnDNz/K9uFB/xCGaemozOxtNPjwwWImTjOBczHUGh 8Yyg== X-Gm-Message-State: APjAAAUXafWSixK7jUmL/P9ZDo+59mbj3PgZoA75D3mmvAan2giFcfqI m7HEu1Yj//wTiUIrd8/W4XI= X-Google-Smtp-Source: APXvYqwwe05auT21M/sY+Xh/TA5V7/HcKWd65FLpG233MVqGL0Htu59RrwiHcLA7Eiw+aRHi3ick0g== X-Received: by 2002:aa7:da91:: with SMTP id q17mr3088721eds.308.1581691207124; Fri, 14 Feb 2020 06:40:07 -0800 (PST) Received: from [192.168.0.155] ([109.110.245.170]) by smtp.googlemail.com with ESMTPSA id f7sm591453ejq.38.2020.02.14.06.40.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 14 Feb 2020 06:40:06 -0800 (PST) Subject: Re: bug#39452: [PATCH] vc-git-state fails for filenames with wildcards To: Eli Zaretskii References: <83h802g77h.fsf@gnu.org> <8f427281-510c-30c3-995f-364e22d9c1e2@yandex.ru> <85y2texxso.fsf@gmail.com> <52f47a82-b93e-d9c2-ee94-752b289d4b96@yandex.ru> <83d0ahpkzu.fsf@gnu.org> <6f06f4c8-17c0-31a7-a6d8-e40686b1e987@yandex.ru> <83y2t5ntm6.fsf@gnu.org> From: Dmitry Gutov Message-ID: <360947a9-3828-a97d-1ddf-6990344e8f77@yandex.ru> Date: Fri, 14 Feb 2020 16:40:04 +0200 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: <83y2t5ntm6.fsf@gnu.org> 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: 39452 Cc: npostavs@gmail.com, 39452@debbugs.gnu.org, Wolfgang.Scherer@gmx.de X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) On 14.02.2020 16:14, Eli Zaretskii wrote: > Any command that prompts for a file name, I guess. vc-delete-file and > vc-rename-file come to mind. In both of these commands entering a non-trivial pathspec is both undocumented and hard to do: look at the interactive form, it calls read-file-name with MUSTMATCH t. In other words, it doesn't let you input interactively anything that's not an existing file name. > But my comment was more general: we don't plan on not supporting Git > specs in file names, do we? I don't see how we'd keep supporting them in these two particular commands without keeping bugs similar to this one unfixed (e.g. 'M-x vc-delete-file test[56].xx' where test[56].xx is an existing filename). AFAICS, they're working purely by accident. That's not to say we can't introduce new versions of these commands that would accept pathspecs (or do it with C-u, etc). From debbugs-submit-bounces@debbugs.gnu.org Fri Feb 14 10:46:01 2020 Received: (at 39452) by debbugs.gnu.org; 14 Feb 2020 15:46:01 +0000 Received: from localhost ([127.0.0.1]:34482 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j2dAG-00037R-Ny for submit@debbugs.gnu.org; Fri, 14 Feb 2020 10:46:00 -0500 Received: from eggs.gnu.org ([209.51.188.92]:37133) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j2dAD-000378-W8 for 39452@debbugs.gnu.org; Fri, 14 Feb 2020 10:45:58 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:34250) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1j2dA8-0004wo-6q; Fri, 14 Feb 2020 10:45:52 -0500 Received: from [176.228.60.248] (port=3578 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1j2dA7-0001zg-GR; Fri, 14 Feb 2020 10:45:51 -0500 Date: Fri, 14 Feb 2020 17:45:56 +0200 Message-Id: <83wo8pnpe3.fsf@gnu.org> From: Eli Zaretskii To: Dmitry Gutov In-reply-to: <360947a9-3828-a97d-1ddf-6990344e8f77@yandex.ru> (message from Dmitry Gutov on Fri, 14 Feb 2020 16:40:04 +0200) Subject: Re: bug#39452: [PATCH] vc-git-state fails for filenames with wildcards References: <83h802g77h.fsf@gnu.org> <8f427281-510c-30c3-995f-364e22d9c1e2@yandex.ru> <85y2texxso.fsf@gmail.com> <52f47a82-b93e-d9c2-ee94-752b289d4b96@yandex.ru> <83d0ahpkzu.fsf@gnu.org> <6f06f4c8-17c0-31a7-a6d8-e40686b1e987@yandex.ru> <83y2t5ntm6.fsf@gnu.org> <360947a9-3828-a97d-1ddf-6990344e8f77@yandex.ru> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 39452 Cc: npostavs@gmail.com, 39452@debbugs.gnu.org, Wolfgang.Scherer@gmx.de X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > Cc: npostavs@gmail.com, 39452@debbugs.gnu.org, Wolfgang.Scherer@gmx.de > From: Dmitry Gutov > Date: Fri, 14 Feb 2020 16:40:04 +0200 > > On 14.02.2020 16:14, Eli Zaretskii wrote: > > Any command that prompts for a file name, I guess. vc-delete-file and > > vc-rename-file come to mind. > > In both of these commands entering a non-trivial pathspec is both > undocumented and hard to do: look at the interactive form, it calls > read-file-name with MUSTMATCH t. In other words, it doesn't let you > input interactively anything that's not an existing file name. > > > But my comment was more general: we don't plan on not supporting Git > > specs in file names, do we? > > I don't see how we'd keep supporting them in these two particular > commands without keeping bugs similar to this one unfixed (e.g. 'M-x > vc-delete-file test[56].xx' where test[56].xx is an existing filename). > > AFAICS, they're working purely by accident. That's not to say we can't > introduce new versions of these commands that would accept pathspecs (or > do it with C-u, etc). I won't argue. I just wanted to point out that using Git signatures internally might get in the way, whereas environment variables and command-line switches are free from that disadvantage. From debbugs-submit-bounces@debbugs.gnu.org Fri Feb 14 15:37:53 2020 Received: (at 39452) by debbugs.gnu.org; 14 Feb 2020 20:37:53 +0000 Received: from localhost ([127.0.0.1]:34763 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j2hii-0003yo-Rz for submit@debbugs.gnu.org; Fri, 14 Feb 2020 15:37:53 -0500 Received: from mail-wr1-f66.google.com ([209.85.221.66]:42869) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j2hih-0003yc-0b for 39452@debbugs.gnu.org; Fri, 14 Feb 2020 15:37:51 -0500 Received: by mail-wr1-f66.google.com with SMTP id k11so12421106wrd.9 for <39452@debbugs.gnu.org>; Fri, 14 Feb 2020 12:37:50 -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=BjIsyr41W9HE4xa0xh8OEWFHroxG2NKytfftAp5cq7c=; b=vEeTX4XZsjq+bNTkOBKnOU0m3ebswetwYH5V24V5NcZsp2BNS9z6KbJwJn2ew6JGbz uy1aGKfWJ8kqy2mt7280YQmhuAe+cYtW2wjGKIc+vMyICwVXEIH2biyOaPrKHm5uSfLi +hAbd3KGlnmq+3hW1DSmVQ5JltEPT8EvWr7a7UZ40hPjBnnPaXroX/sk9fUjX5Q9Zos/ nIwzKP8lSIbQxkRmo7uh31md0kTiiJ4Hc5Gty3IfpOknvzARSUEjS+qRvh16ofBL0Edf mgZbI1VPhWB2pZf+MudpC6obe2QWWYaa833Z0b+iLGnsZwPpgsTU7JM6rTCKWBeBRUcR Fudg== 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=BjIsyr41W9HE4xa0xh8OEWFHroxG2NKytfftAp5cq7c=; b=ViaWo199PpcOayCniC9h7WMKdthjg8r6pGbVAUZCgm31dF9Y6rETIWoFBP/VC1fHxS 05iO43U0yZByx/0TKVKYM3Wj1V9PIgC7qPKdJiL3SxH/elHZVqctNMVvmm0+sVAR04Or HQZ7B5Jx7cr1GqQq6YkaRaAto30J3Z4j2A/bj8+Yu2oylf6U2skged/Tl90++d1uLhSY LByv+/7HMZCVljos7s8+UAN4w+090B38MIzLuMe/g8TArpv4mHOvD1r4DPlIy8TzG6bp haFvFMOj50FP0aBur0iZwANMiH3iS1FU5/Y45CBeu3JME1c3ZwR9eUx9b9ZK/x5xnxnA akeA== X-Gm-Message-State: APjAAAWpjn4AIGUfx+9Sy+8IW/9DzhyKlPwTydbWOyiIyLs7f5Iv6qGv syhLzcxzEtYEoAvE+dwkzSQ= X-Google-Smtp-Source: APXvYqzHHwBHjxTVVuGH8rKyEgYu67X0LaBxfZwtDLDFbQyOlh7JU6UnbZf1DtT4QA4dLP816CF3DQ== X-Received: by 2002:adf:dd46:: with SMTP id u6mr5546367wrm.13.1581712664985; Fri, 14 Feb 2020 12:37:44 -0800 (PST) Received: from [192.168.0.3] ([66.205.73.129]) by smtp.googlemail.com with ESMTPSA id a13sm8520673wrp.93.2020.02.14.12.37.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 14 Feb 2020 12:37:44 -0800 (PST) Subject: Re: bug#39452: [PATCH] vc-git-state fails for filenames with wildcards To: Eli Zaretskii References: <83h802g77h.fsf@gnu.org> <8f427281-510c-30c3-995f-364e22d9c1e2@yandex.ru> <85y2texxso.fsf@gmail.com> <52f47a82-b93e-d9c2-ee94-752b289d4b96@yandex.ru> <83d0ahpkzu.fsf@gnu.org> <6f06f4c8-17c0-31a7-a6d8-e40686b1e987@yandex.ru> <83y2t5ntm6.fsf@gnu.org> <360947a9-3828-a97d-1ddf-6990344e8f77@yandex.ru> <83wo8pnpe3.fsf@gnu.org> From: Dmitry Gutov Message-ID: Date: Fri, 14 Feb 2020 22:37:42 +0200 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: <83wo8pnpe3.fsf@gnu.org> 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: 39452 Cc: npostavs@gmail.com, 39452@debbugs.gnu.org, Wolfgang.Scherer@gmx.de X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) On 14.02.2020 17:45, Eli Zaretskii wrote: > I won't argue. I just wanted to point out that using Git signatures > internally might get in the way, whereas environment variables and > command-line switches are free from that disadvantage. Um, I think they're about the same in the level of convenience for us to be able to disable either: we can add a global var which would affect whether specs are interpreted literally. If anything, approach #1 is slightly easier if we wanted to support opting out of literal-quoting the specs at the level of VC backend actions: certain action implementations can simply avoid calling the proposed functions (like vc-git--literal-pathspec). But then, I'm not sure that we want this capability at exactly that abstraction level. From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 20 05:54:19 2020 Received: (at 39452) by debbugs.gnu.org; 20 Sep 2020 09:54:19 +0000 Received: from localhost ([127.0.0.1]:48751 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kJw30-0000yJ-Ok for submit@debbugs.gnu.org; Sun, 20 Sep 2020 05:54:19 -0400 Received: from quimby.gnus.org ([95.216.78.240]:58608) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kJw2y-0000y1-Ci for 39452@debbugs.gnu.org; Sun, 20 Sep 2020 05:54:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=CuQRINnirgFy/ONQhYKcfgGdXRDIlS7PmUwDS1qHDXw=; b=ClWyYOeS/1VPnPYUyWBS/Dnfyo ggjvGg6/m5zeyM4Q6mk0y7pmxTTlS5vwQxLfoWOL42PyzK4NfywdGHenmILY7QUgLD3Xzbb02DDgG P9a4Q9IjqawQkOI6kYBkcdH/OuykyfQqQ2jGsWTt2pkB+8ymd95w/VEjnFGCPl93i+V0=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kJw2p-0005ta-MY; Sun, 20 Sep 2020 11:54:10 +0200 From: Lars Ingebrigtsen To: Dmitry Gutov Subject: Re: bug#39452: [PATCH] vc-git-state fails for filenames with wildcards References: <83h802g77h.fsf@gnu.org> <8f427281-510c-30c3-995f-364e22d9c1e2@yandex.ru> <85y2texxso.fsf@gmail.com> <52f47a82-b93e-d9c2-ee94-752b289d4b96@yandex.ru> X-Now-Playing: Andrew Poppy's _On Zang Tuum Tumb (3): Under the Son_: "The Sequence" Date: Sun, 20 Sep 2020 11:54:06 +0200 In-Reply-To: (Dmitry Gutov's message of "Fri, 14 Feb 2020 01:23:50 +0200") Message-ID: <874knssri9.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.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 @@CONTACT_ADDRESS@@ for details. Content preview: Dmitry Gutov writes: > Eli, what do you think is better, applying a more verbose fix (which > prepends stuff to every file name) and spending some of our complexity > budged on that. > > Or using the simple fix and docume [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 39452 Cc: Eli Zaretskii , Noam Postavsky , 39452@debbugs.gnu.org, Wolfgang Scherer X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Dmitry Gutov writes: > Eli, what do you think is better, applying a more verbose fix (which > prepends stuff to every file name) and spending some of our complexity > budged on that. > > Or using the simple fix and documenting the git hooks erratum in the > manual (or somewhere else). > > I'm inclining toward the latter, esp. considering that the problem > should be familiar to Magit users already, and thus the fix is > prominently documented on the Internet. It seems like everybody agreed that adding the environment variable and documenting the problem would be the best fix here, but it doesn't look like that was applied? -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Wed May 12 12:04:58 2021 Received: (at 39452) by debbugs.gnu.org; 12 May 2021 16:04:58 +0000 Received: from localhost ([127.0.0.1]:40162 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lgrM2-0006Sn-9L for submit@debbugs.gnu.org; Wed, 12 May 2021 12:04:58 -0400 Received: from quimby.gnus.org ([95.216.78.240]:60220) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lgrM0-0006SW-MW for 39452@debbugs.gnu.org; Wed, 12 May 2021 12:04:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=PJvkqazgEUADsQp6RWrYoweRHt8HQvOPQpHqxQ/TbB8=; b=DKXebyewNb4iW2hqwbq5bULbKM 2zkbmqDicUi6OStJHmuwg1zTte0g+/yNrbaVahbOSUGdh2TpxV42QkYgh3gk6bn1aqhTiqycEUXQA 8s6Pbv+4HSxEtAb6shn0Qbxm7zItkUv/E96pxN4TjMh/ak+yci1curHwD5bebQ02IBHQ=; Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lgrLr-0006Sz-JG; Wed, 12 May 2021 18:04:50 +0200 From: Lars Ingebrigtsen To: Noam Postavsky Subject: Re: bug#39452: [PATCH] vc-git-state fails for filenames with wildcards References: <83h802g77h.fsf@gnu.org> <8f427281-510c-30c3-995f-364e22d9c1e2@yandex.ru> <85y2texxso.fsf@gmail.com> <52f47a82-b93e-d9c2-ee94-752b289d4b96@yandex.ru> <85lfp7ygk3.fsf@gmail.com> X-Now-Playing: Tuxedomoon's _Live in Alberobello, Italy_: "Still Small Voice" Date: Wed, 12 May 2021 18:04:47 +0200 In-Reply-To: <85lfp7ygk3.fsf@gmail.com> (Noam Postavsky's message of "Wed, 12 Feb 2020 10:24:28 -0500") Message-ID: <87pmxwgcps.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.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 @@CONTACT_ADDRESS@@ for details. Content preview: Noam Postavsky writes: >> I wonder how bad the latter problem is. After all, even if it >> happens, it *can* be worked around in the same scripts. > > Yes, it's common enough to have a FAQ for it. > https://magit.vc/manual/ [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 39452 Cc: Wolfgang.Scherer@gmx.de, 39452@debbugs.gnu.org, Dmitry Gutov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Noam Postavsky writes: >> I wonder how bad the latter problem is. After all, even if it >> happens, it *can* be worked around in the same scripts. > > Yes, it's common enough to have a FAQ for it. > https://magit.vc/manual/magit/My-Git-hooks-work-on-the-command_002dline-but-not-inside-Magit.html Wolfgang's patch is larger, but doesn't have these drawbacks (if I understand things correctly) -- so wouldn't it make sense to apply Wolfgang's patch here? -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Sun May 16 21:05:25 2021 Received: (at 39452) by debbugs.gnu.org; 17 May 2021 01:05:25 +0000 Received: from localhost ([127.0.0.1]:51694 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1liRhF-0006Kw-As for submit@debbugs.gnu.org; Sun, 16 May 2021 21:05:25 -0400 Received: from mail-wr1-f45.google.com ([209.85.221.45]:34568) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1liRhD-0006Kj-NR for 39452@debbugs.gnu.org; Sun, 16 May 2021 21:05:24 -0400 Received: by mail-wr1-f45.google.com with SMTP id r12so4653754wrp.1 for <39452@debbugs.gnu.org>; Sun, 16 May 2021 18:05:23 -0700 (PDT) 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=XlvOlBmbiR1A4nT8KpTzThQ7YDSdGBu9HmtOTVi0Ynk=; b=CfEXFeovDvisiLNW5yfwsx6K8nKV0fApozmD8DhDYair14p92IRIZVRell0XXm8QmV 6bpv2LrTc4M6Wx6bpxPIYSkswijsFTXzrlS7J2r3gbM8qHlpaq7q0ubKseonGz1hbFzc Q89/Ojdp+yRztihAzDAlFbCi9sbMotP0LVeRAhPRI6cuPLjF57ld3Qv224H7MB8BMlPp nk8+2cQwaqWs2axju0aUyCBvxffonv62VvZguExiF6z1NeqfUthCVQl1PJwJtEwnPqpe xsj+gYzCqVU14hVRH1/Cn+0O0QHlRwbBIhTpfku8YvS8UKkeECvatBxCQEuPW+fnr/rQ oyLw== 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=XlvOlBmbiR1A4nT8KpTzThQ7YDSdGBu9HmtOTVi0Ynk=; b=ZqaFRPEoFRLd6GQz87GqfEbALj+7c9wHZc59vZ8pRXHoeO2h8rUBCag6en3OfsKy7j KWl2/P4d0QW6UiOxN7EWq7kun3wVULOVZrx4BSFE3mjcH4q2QVEDuboc3HOoovo90mI/ im42vTzCqQvzCDBMJnIfO+yM9lIZptgqKWIygm6OQDcDdWVUMBi/xvEqH1br3VpbjpbK QqDYHW8JBQMWdxLixlHht2ybqPx8bOV4ld8q4EKN8gOh0cdJxsYIjAZ/NMMa+xedFtoi 3LC3w81r5a9sWfsJIgEBdlvRB9xJSRmbmkLPyFXzCr8xUCnxsy6VKgZPLo6wVeE9MuRY T4Pw== X-Gm-Message-State: AOAM531ffVBgl86KOQaZnYRlQqsVT/xJplnj0l4sPj/OU6MwNfqI1dGO v4yWjSINlJazLWtwAxpBfDo= X-Google-Smtp-Source: ABdhPJw44pnbx4zzH6mSLamHp2BUPmikox4KVwepGS/iI/e5b9GrcOJHpfcBbHJOUytMpgkj38FFkw== X-Received: by 2002:a05:6000:1ac7:: with SMTP id i7mr72111909wry.380.1621213518009; Sun, 16 May 2021 18:05:18 -0700 (PDT) Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id y14sm15244722wrr.82.2021.05.16.18.05.16 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 16 May 2021 18:05:17 -0700 (PDT) Subject: Re: bug#39452: [PATCH] vc-git-state fails for filenames with wildcards To: Lars Ingebrigtsen , Noam Postavsky References: <83h802g77h.fsf@gnu.org> <8f427281-510c-30c3-995f-364e22d9c1e2@yandex.ru> <85y2texxso.fsf@gmail.com> <52f47a82-b93e-d9c2-ee94-752b289d4b96@yandex.ru> <85lfp7ygk3.fsf@gmail.com> <87pmxwgcps.fsf@gnus.org> From: Dmitry Gutov Message-ID: <1cb67253-c43f-caac-ee83-1241edaaeeaa@yandex.ru> Date: Mon, 17 May 2021 04:05:15 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: <87pmxwgcps.fsf@gnus.org> 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: 39452 Cc: 39452@debbugs.gnu.org, Wolfgang.Scherer@gmx.de X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) On 12.05.2021 19:04, Lars Ingebrigtsen wrote: > Wolfgang's patch is larger, but doesn't have these drawbacks (if I > understand things correctly) -- so wouldn't it make sense to apply > Wolfgang's patch here? It's a pretty big fix for a straightforward (if fundamental) problem. The existence of the FAQ entry personally just tells me that the other approach has been proven in the field (by Magit), and if a FAQ entry is enough, the side-effects are probably not that common or serious. Because users, in general, don't read documentation. But other opinions welcome. From debbugs-submit-bounces@debbugs.gnu.org Thu Jul 22 08:43:04 2021 Received: (at 39452) by debbugs.gnu.org; 22 Jul 2021 12:43:04 +0000 Received: from localhost ([127.0.0.1]:39635 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m6Y2Q-0003c1-98 for submit@debbugs.gnu.org; Thu, 22 Jul 2021 08:43:04 -0400 Received: from quimby.gnus.org ([95.216.78.240]:54480) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m6Y2N-0003bl-R7 for 39452@debbugs.gnu.org; Thu, 22 Jul 2021 08:42:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=YdUNCLAkWon3S44OkshSaL7GIWu3XfDTwx96jaIiUI0=; b=o0sA98deGaiJ6u2kMiJcugh4jX IxCQgqOcLR+34VRIvDIHLjRnw35bHorT5FhFd0VDL1/0H/mmvLRNn3NskKCyIybML6V32+xoBBod2 +2PT+VCvkNF80UXiMG69kGTwG6NGEwDfy5LVjndYhzdc2fjbCnmg6fxmC5um4h0AgNao=; Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m6Y2E-0002My-C2; Thu, 22 Jul 2021 14:42:45 +0200 From: Lars Ingebrigtsen To: Dmitry Gutov Subject: Re: bug#39452: [PATCH] vc-git-state fails for filenames with wildcards References: <83h802g77h.fsf@gnu.org> <8f427281-510c-30c3-995f-364e22d9c1e2@yandex.ru> <85y2texxso.fsf@gmail.com> <52f47a82-b93e-d9c2-ee94-752b289d4b96@yandex.ru> <85lfp7ygk3.fsf@gmail.com> <87pmxwgcps.fsf@gnus.org> <1cb67253-c43f-caac-ee83-1241edaaeeaa@yandex.ru> X-Now-Playing: John T. Gast's _Inna Babalon_: "Jah Guidance" Date: Thu, 22 Jul 2021 14:42:41 +0200 In-Reply-To: <1cb67253-c43f-caac-ee83-1241edaaeeaa@yandex.ru> (Dmitry Gutov's message of "Mon, 17 May 2021 04:05:15 +0300") Message-ID: <87k0lildtq.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.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 @@CONTACT_ADDRESS@@ for details. Content preview: Dmitry Gutov writes: > On 12.05.2021 19:04, Lars Ingebrigtsen wrote: >> Wolfgang's patch is larger, but doesn't have these drawbacks (if I >> understand things correctly) -- so wouldn't it make sense to apply >> Wolfgang' [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 39452 Cc: Noam Postavsky , 39452@debbugs.gnu.org, Wolfgang.Scherer@gmx.de X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Dmitry Gutov writes: > On 12.05.2021 19:04, Lars Ingebrigtsen wrote: >> Wolfgang's patch is larger, but doesn't have these drawbacks (if I >> understand things correctly) -- so wouldn't it make sense to apply >> Wolfgang's patch here? > > It's a pretty big fix for a straightforward (if fundamental) problem. > > The existence of the FAQ entry personally just tells me that the other > approach has been proven in the field (by Magit), and if a FAQ entry > is enough, the side-effects are probably not that common or > serious. Because users, in general, don't read documentation. > > But other opinions welcome. Nobody had any opinions, and the "if it's good enough for Magit" argument is a good one. So I went ahead and applied Dmitry's patch to Emacs 28, and we'll see whether there's any push back on that... -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Thu Jul 22 08:43:05 2021 Received: (at control) by debbugs.gnu.org; 22 Jul 2021 12:43:05 +0000 Received: from localhost ([127.0.0.1]:39638 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m6Y2a-0003cb-Q9 for submit@debbugs.gnu.org; Thu, 22 Jul 2021 08:43:05 -0400 Received: from quimby.gnus.org ([95.216.78.240]:54496) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m6Y2R-0003br-Ok for control@debbugs.gnu.org; Thu, 22 Jul 2021 08:43:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=v7+q7cKLF5W4UGIf0q7zmaOIUJbJPpUtXj9woMidLsE=; b=i2niuFAJJOVNdlEPk4GBUqasPA Qgw0l/sTKtERQPRzruFztFMcQCeCBR8bu3kVx0ath50N0/SuYVDf3qh0lZzh8rZ878vBDijbumzEG hEGPpP6pMkwt+IQFx2eONAVksW9RhBZXUv8bxOqxI96mVXJlBbl9NygTjvQEXri5P6XU=; Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m6Y2K-0002N9-6b for control@debbugs.gnu.org; Thu, 22 Jul 2021 14:42:50 +0200 Date: Thu, 22 Jul 2021 14:42:47 +0200 Message-Id: <87im12ldtk.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #39452 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.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 @@CONTACT_ADDRESS@@ for details. Content preview: close 39452 28.1 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) close 39452 28.1 quit From debbugs-submit-bounces@debbugs.gnu.org Fri Aug 13 20:12:09 2021 Received: (at 39452) by debbugs.gnu.org; 14 Aug 2021 00:12:09 +0000 Received: from localhost ([127.0.0.1]:43253 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mEhHV-0001fZ-HB for submit@debbugs.gnu.org; Fri, 13 Aug 2021 20:12:09 -0400 Received: from mail-wr1-f45.google.com ([209.85.221.45]:43561) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mEhHQ-0001f1-J6 for 39452@debbugs.gnu.org; Fri, 13 Aug 2021 20:12:09 -0400 Received: by mail-wr1-f45.google.com with SMTP id z9so15327466wrh.10 for <39452@debbugs.gnu.org>; Fri, 13 Aug 2021 17:12:04 -0700 (PDT) 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=7LEaDG5cpQ+/j4NTQR3N4xWNcnu203pADmMFJ6b5SQE=; b=fPd6hE3vRNznUs4uhtBOERT7CgMgzDiSE4R8+kBKjtEaHxYBbCNjik2iAjdf/QvVM1 r6DedKN0CzObbzoRz6hKrrbykiy4cZISQaCUhM7sZ/eYsMNPwoGCR782VXlhAGkdkSVt s4g7akLwpnbls0mf5VqHi/uigNHykNoPl3//44s0hTAyLPo2DjG3DiBEll2emFnf45Iq U0hJMK3FvUwirQ38stMZBp5csCkQZ0OuUNRB8uN3GViJmE/kQ3xB5Q1qf3jmwZYV/ewx +nSC3nhnQ4k4Z0bYtqb0RwR6VL2JU2lcawe+BFukxkzBAPlMpoElRt55ocxT7Cfl4vAA /T/A== 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=7LEaDG5cpQ+/j4NTQR3N4xWNcnu203pADmMFJ6b5SQE=; b=HdN9DqfNrX7IzDgBvrFEoTkp9u83Ug6AbLsQPoy+MvQzTyXb2zr2ZTLBZKZ43+FdbE t8VxS87Mi02KDuTGwjxACKew3puuxNNEQtvRq9StLte5rJag+n61m58EEssaHQaeZuId QEZq9LwmDYiEz8gx7zo8LL07Q+pJTDeXohtBG+dNRMziBhBxf6NfABaHSaSk1Jtj2+E9 R4z7JnRteqyX5cxjXzoneB+zgvPB/SoyTW+K6qTfIQwg0S1s73u2aO2sIpj2wnyciEKm 0sYBsDaixhH96rNGo64KZXlMKtWiSiMK27+pll1IlVJTLI1F3Z4LdgBtPNLJBSG+f9zb Cd0A== X-Gm-Message-State: AOAM531kxOY1aD423UHRvKnlTHbZs3oPwfO7ToTOMXo4Su5RoW8/xtDs xbagcUsJ0g+ltt9EJ7LqS5k= X-Google-Smtp-Source: ABdhPJyuzFLQW4iKFseenlAz9SowYwJrPJqQsWPjN38y9rtoB7kkhUOJ3SFp1Wnk1qycSgYTs67aBA== X-Received: by 2002:a05:6000:1b87:: with SMTP id r7mr5872654wru.63.1628899918747; Fri, 13 Aug 2021 17:11:58 -0700 (PDT) Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id z6sm2772871wmp.1.2021.08.13.17.11.57 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 13 Aug 2021 17:11:58 -0700 (PDT) Subject: Re: bug#39452: [PATCH] vc-git-state fails for filenames with wildcards To: Lars Ingebrigtsen References: <83h802g77h.fsf@gnu.org> <8f427281-510c-30c3-995f-364e22d9c1e2@yandex.ru> <85y2texxso.fsf@gmail.com> <52f47a82-b93e-d9c2-ee94-752b289d4b96@yandex.ru> <85lfp7ygk3.fsf@gmail.com> <87pmxwgcps.fsf@gnus.org> <1cb67253-c43f-caac-ee83-1241edaaeeaa@yandex.ru> <87k0lildtq.fsf@gnus.org> From: Dmitry Gutov Message-ID: <6e6060f9-0259-9b12-f925-a1a85c6757c4@yandex.ru> Date: Sat, 14 Aug 2021 03:11:56 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <87k0lildtq.fsf@gnus.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 0.4 (/) X-Debbugs-Envelope-To: 39452 Cc: Noam Postavsky , 39452@debbugs.gnu.org, Wolfgang.Scherer@gmx.de X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.6 (/) On 22.07.2021 15:42, Lars Ingebrigtsen wrote: > Nobody had any opinions, and the "if it's good enough for Magit" > argument is a good one. So I went ahead and applied Dmitry's patch to > Emacs 28, and we'll see whether there's any push back on that... As luck would have it, I have a bit of code (namely project--vc-list-files) that got broken with that change. Because, when EXTRA-IGNORES are present, it constructs some non-literal pathspecs, which naturally fail (get misinterpreted) with GIT_LITERAL_PATHSPECS=1. So we need an escape hatch to turn off this feature, which could take form of a dynamic variable, like in the patch below. Or we could revert to the other approach. What do people think? diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index 714edeba5f..824ea55e7b 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el @@ -523,6 +523,7 @@ project--vc-list-files (`Git (let ((default-directory (expand-file-name (file-name-as-directory dir))) (args '("-z")) + vc-git-use-literal-pathspecs files) ;; Include unregistered. (setq args (append args diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el index 143087122f..1082e724ff 100644 --- a/lisp/vc/vc-git.el +++ b/lisp/vc/vc-git.el @@ -220,6 +220,9 @@ vc-git-revision-complete-only-branches :type 'boolean :version "28.1") +(defvar vc-git-use-literal-pathspecs t + "Non-nil to interpret all Git pathspecs literally.") + ;; History of Git commands. (defvar vc-git-history nil) @@ -1772,7 +1775,8 @@ vc-git-command (process-environment (append `("GIT_DIR" - "GIT_LITERAL_PATHSPECS=1" + ,@(when vc-git-use-literal-pathspecs + '("GIT_LITERAL_PATHSPECS=1")) ;; Avoid repository locking during background operations ;; (bug#21559). ,@(when revert-buffer-in-progress-p @@ -1807,8 +1811,9 @@ vc-git--call (process-environment (append `("GIT_DIR" - "GIT_LITERAL_PATHSPECS=1" - ;; Avoid repository locking during background operations + ,@(when vc-git-use-literal-pathspecs + '("GIT_LITERAL_PATHSPECS=1")) + ;; Avoid repository locking during background operations ;; (bug#21559). ,@(when revert-buffer-in-progress-p '("GIT_OPTIONAL_LOCKS=0"))) From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 14 07:56:50 2021 Received: (at 39452) by debbugs.gnu.org; 14 Aug 2021 11:56:50 +0000 Received: from localhost ([127.0.0.1]:43734 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mEsHR-0000h0-SJ for submit@debbugs.gnu.org; Sat, 14 Aug 2021 07:56:50 -0400 Received: from quimby.gnus.org ([95.216.78.240]:60698) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mEsHP-0000gn-QV for 39452@debbugs.gnu.org; Sat, 14 Aug 2021 07:56:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=uVfJyoMORJHGwthmXAxiGsD6a+r7PBmn1BWES/RjMTw=; b=lJeCEVBCiP7ZhiVQpZ8Ye0hSku YTISyFtfA/1JU4Mm+fV3TxnKXDWDPRtpxDOE2/mLwOdYpEGgUrNHWRPKq9UxV2v8PwtWqq5Yv2wK7 G5o31XtST8OYR7Rt1qHRV7dKDhbIJfwX9dHNcSHzGWLaNpEKeXBdQnjbpVMUfPmArp/M=; Received: from [84.212.220.105] (helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mEsHF-0000E7-B3; Sat, 14 Aug 2021 13:56:41 +0200 From: Lars Ingebrigtsen To: Dmitry Gutov Subject: Re: bug#39452: [PATCH] vc-git-state fails for filenames with wildcards References: <83h802g77h.fsf@gnu.org> <8f427281-510c-30c3-995f-364e22d9c1e2@yandex.ru> <85y2texxso.fsf@gmail.com> <52f47a82-b93e-d9c2-ee94-752b289d4b96@yandex.ru> <85lfp7ygk3.fsf@gmail.com> <87pmxwgcps.fsf@gnus.org> <1cb67253-c43f-caac-ee83-1241edaaeeaa@yandex.ru> <87k0lildtq.fsf@gnus.org> <6e6060f9-0259-9b12-f925-a1a85c6757c4@yandex.ru> Date: Sat, 14 Aug 2021 13:56:36 +0200 In-Reply-To: <6e6060f9-0259-9b12-f925-a1a85c6757c4@yandex.ru> (Dmitry Gutov's message of "Sat, 14 Aug 2021 03:11:56 +0300") Message-ID: <877dgoutmz.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.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 @@CONTACT_ADDRESS@@ for details. Content preview: Dmitry Gutov writes: >> Nobody had any opinions, and the "if it's good enough for Magit" >> argument is a good one. So I went ahead and applied Dmitry's patch to >> Emacs 28, and we'll see whether there's any push back on [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 39452 Cc: Noam Postavsky , 39452@debbugs.gnu.org, Wolfgang.Scherer@gmx.de X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Dmitry Gutov writes: >> Nobody had any opinions, and the "if it's good enough for Magit" >> argument is a good one. So I went ahead and applied Dmitry's patch to >> Emacs 28, and we'll see whether there's any push back on that... > > As luck would have it, I have a bit of code (namely > project--vc-list-files) that got broken with that change. > > Because, when EXTRA-IGNORES are present, it constructs some > non-literal pathspecs, which naturally fail (get misinterpreted) with > GIT_LITERAL_PATHSPECS=1. > > So we need an escape hatch to turn off this feature, which could take > form of a dynamic variable, like in the patch below. > > Or we could revert to the other approach. What do people think? If we've seen one piece of code break here already, then perhaps reverting and moving to the other (safer, but more invasive) approach is the right way to go. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 14 21:25:31 2021 Received: (at 39452) by debbugs.gnu.org; 15 Aug 2021 01:25:31 +0000 Received: from localhost ([127.0.0.1]:45552 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mF4u2-00027b-TJ for submit@debbugs.gnu.org; Sat, 14 Aug 2021 21:25:31 -0400 Received: from mail-wm1-f44.google.com ([209.85.128.44]:53939) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mF4u1-00027O-3S for 39452@debbugs.gnu.org; Sat, 14 Aug 2021 21:25:30 -0400 Received: by mail-wm1-f44.google.com with SMTP id k4so9266216wms.3 for <39452@debbugs.gnu.org>; Sat, 14 Aug 2021 18:25:29 -0700 (PDT) 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=+I1y+WzyTOBpQYXVPnq7MBoRitV2LIOv4zKTmhIpJI0=; b=FRz1W6Cj7O3i6pcJuqu/0Ew9xkZ0TYXpt4sREdSFvxy8/m0nB9XLfCFteQOVXfpwL1 51ADI7XPeq5lj+OjBPGz8YysfzaBricIecEZB5Snz6PuiLaIKzhFYoXbtf8E27lzNuFc a7HfE2ld5+8RAq1HxAS3f6FdecfKCGotBibq06jYuZEAykm8/8RsdapNLqcrrelaxHeZ kzdzhOrcQhKjJtC3zifAjnkYKQicjx2o8q7xCu3SMJPw9XKpMes8fay9x99nL67/4Wct 2e805Fzv5CsUkzSj8jMREi9kFLyF1Rxzv3TR1UZDZj1UhL6vgynb6eCpDqCzM1nNe0Jj pTZA== 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=+I1y+WzyTOBpQYXVPnq7MBoRitV2LIOv4zKTmhIpJI0=; b=TGiV02uv9ccTXKjXAUlsPJbNpRZ7EjEXPaH0Zpv/+ZiJ2BhN+x0RVPn/Rx89Lu9Amu SWhwJiBAXnsmKPBIXK0XeMA5GxFNBN0th5c4RUyijnel3FyCRFB9g0wKzjrbaMbD8RUJ zV2/I0ByWZ6/ZWpBAUNIfzk9lRYWeiVP2sXS+b4BmXfQTwRByib1sbts2L+kLi6q6048 GFQTQ+EuD0BCg1ZoowOeI7iCFZ/VRabBDTldsafT5jzhsUek72vpKLP3p5gkiAILaYJH euPYDg18ZdWiEB8su8YJPMhRG0t7+WaxS0XNz4IdLnFGNkXMy4rxPSknUEa4fcggV/9M xScA== X-Gm-Message-State: AOAM531meVa7mZ3UQKYomQEQ4sQt3dAV7/iE2/sDdVTjDy/L4dl0oNiY Hx2nkMFrS2Ug4rmDFoU8ZJ4= X-Google-Smtp-Source: ABdhPJynlwi8MsvaLvtmYRj8se6w+lL1pe22DTvTN2vPOmvpKF5QddouQIsQg/H0tVZ7/0EmDNsXaA== X-Received: by 2002:a1c:46:: with SMTP id 67mr4419877wma.29.1628990723296; Sat, 14 Aug 2021 18:25:23 -0700 (PDT) Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id p6sm6267638wrw.50.2021.08.14.18.25.21 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 14 Aug 2021 18:25:22 -0700 (PDT) Subject: Re: bug#39452: [PATCH] vc-git-state fails for filenames with wildcards To: Lars Ingebrigtsen References: <83h802g77h.fsf@gnu.org> <8f427281-510c-30c3-995f-364e22d9c1e2@yandex.ru> <85y2texxso.fsf@gmail.com> <52f47a82-b93e-d9c2-ee94-752b289d4b96@yandex.ru> <85lfp7ygk3.fsf@gmail.com> <87pmxwgcps.fsf@gnus.org> <1cb67253-c43f-caac-ee83-1241edaaeeaa@yandex.ru> <87k0lildtq.fsf@gnus.org> <6e6060f9-0259-9b12-f925-a1a85c6757c4@yandex.ru> <877dgoutmz.fsf@gnus.org> From: Dmitry Gutov Message-ID: <2602aeaf-0f02-e744-2b4f-012e73e012e8@yandex.ru> Date: Sun, 15 Aug 2021 04:25:20 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <877dgoutmz.fsf@gnus.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 0.4 (/) X-Debbugs-Envelope-To: 39452 Cc: Noam Postavsky , 39452@debbugs.gnu.org, Wolfgang.Scherer@gmx.de X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.6 (/) On 14.08.2021 14:56, Lars Ingebrigtsen wrote: > If we've seen one piece of code break here already, then perhaps > reverting and moving to the other (safer, but more invasive) approach is > the right way to go. Fair enough. Pushed the other patch with a couple of small tweaks. Thanks again to Wolfgang. From debbugs-submit-bounces@debbugs.gnu.org Fri Aug 27 02:23:39 2021 Received: (at 39452) by debbugs.gnu.org; 27 Aug 2021 06:23:39 +0000 Received: from localhost ([127.0.0.1]:51083 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mJVH9-00042I-F4 for submit@debbugs.gnu.org; Fri, 27 Aug 2021 02:23:39 -0400 Received: from relay6-d.mail.gandi.net ([217.70.183.198]:51525) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mJVH6-00041z-Mo for 39452@debbugs.gnu.org; Fri, 27 Aug 2021 02:23:37 -0400 Received: (Authenticated sender: juri@linkov.net) by relay6-d.mail.gandi.net (Postfix) with ESMTPSA id 2B51CC0008; Fri, 27 Aug 2021 06:23:27 +0000 (UTC) From: Juri Linkov To: Dmitry Gutov Subject: Re: bug#39452: [PATCH] vc-git-state fails for filenames with wildcards References: <83h802g77h.fsf@gnu.org> <8f427281-510c-30c3-995f-364e22d9c1e2@yandex.ru> <85y2texxso.fsf@gmail.com> <52f47a82-b93e-d9c2-ee94-752b289d4b96@yandex.ru> <85lfp7ygk3.fsf@gmail.com> <87pmxwgcps.fsf@gnus.org> <1cb67253-c43f-caac-ee83-1241edaaeeaa@yandex.ru> <87k0lildtq.fsf@gnus.org> <6e6060f9-0259-9b12-f925-a1a85c6757c4@yandex.ru> <877dgoutmz.fsf@gnus.org> <2602aeaf-0f02-e744-2b4f-012e73e012e8@yandex.ru> Date: Fri, 27 Aug 2021 09:05:31 +0300 In-Reply-To: <2602aeaf-0f02-e744-2b4f-012e73e012e8@yandex.ru> (Dmitry Gutov's message of "Sun, 15 Aug 2021 04:25:20 +0300") Message-ID: <87y28nbky4.fsf@linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 39452 Cc: Lars Ingebrigtsen , Noam Postavsky , 39452@debbugs.gnu.org, Wolfgang.Scherer@gmx.de X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >> If we've seen one piece of code break here already, then perhaps >> reverting and moving to the other (safer, but more invasive) approach is >> the right way to go. > > Fair enough. > > Pushed the other patch with a couple of small tweaks. This broke vc-rename-file that now fails with (error Failed (status 128): git --no-pager mv -f -- :(literal)/tmp/gitrepo/subdir/file1 :(literal)/tmp/gitrepo/subdir/file2) fatal: bad source, source=subdir/:(literal)/tmp/gitrepo/subdir/file1, destination=subdir/:(literal)/tmp/gitrepo/subdir/file2 Can be fixed with diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el index 02ca022ad4..88e015fc9d 100644 --- a/lisp/vc/vc-git.el +++ b/lisp/vc/vc-git.el @@ -1559,7 +1559,7 @@ vc-git-delete-file (vc-git-command nil 0 (vc-git--literal-pathspecs file) "rm" "-f" "--")) (defun vc-git-rename-file (old new) - (vc-git-command nil 0 (vc-git--literal-pathspecs (list old new)) "mv" "-f" "--")) + (vc-git-command nil 0 (list old new) "mv" "-f" "--")) (defun vc-git-mark-resolved (files) (vc-git-command nil 0 (vc-git--literal-pathspecs files) "add")) From debbugs-submit-bounces@debbugs.gnu.org Fri Aug 27 08:52:04 2021 Received: (at 39452) by debbugs.gnu.org; 27 Aug 2021 12:52:05 +0000 Received: from localhost ([127.0.0.1]:51428 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mJbL2-0007UQ-NQ for submit@debbugs.gnu.org; Fri, 27 Aug 2021 08:52:04 -0400 Received: from mail-wm1-f50.google.com ([209.85.128.50]:40902) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mJbKy-0007Tt-G2 for 39452@debbugs.gnu.org; Fri, 27 Aug 2021 08:52:03 -0400 Received: by mail-wm1-f50.google.com with SMTP id x2-20020a1c7c02000000b002e6f1f69a1eso9140970wmc.5 for <39452@debbugs.gnu.org>; Fri, 27 Aug 2021 05:52:00 -0700 (PDT) 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=Z26Siy+itJ9zfZF0SlOyTV7tYN2ghUvocdRs0/1JcnA=; b=VEkcK8nnGl+1BcIV9h1ONlyjQrOs5tGjGDr2cjkubhNFB/sCPKlMN6k6TW9UjSjTLk spzlXyV9OXgS5lTKOfMfQphO96BMr+/rcXG03dsUAlJUyZY7AXQnslSKd4QFRuVpJB1G jy5uPtnQLV8GVAmE+4gMYFcLPruEVwcJTPwF+UKREFyJQPoQf49uObyt4ZK86LUTatv0 lPO6jWgcyWAbB+ozs3UVJLZu1H2zD71DFH2jWciHalxIFoONa7uR0K1azsDquhmYzrc0 BPvq+nj4swf/fFwV15NzOgIhA2larZimUpmu5g5uz3PJALnYj/emmCMMG1/tHGpu04fN i3UQ== 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=Z26Siy+itJ9zfZF0SlOyTV7tYN2ghUvocdRs0/1JcnA=; b=V00bbZfRV+D1S8XnmBQedJWtb7krtuaerqDVL1JThhcQBdAy/dH0Fxyfa8zkM9WlpV +opSKrBt8P98ZOk3TT9/m61xdNVgGdPYOgPCjy0hl+QLPDT2B+wKeKYBKpcDrFI7tsn5 Zkvee2nP30QnF8lO10auUu1vRkT1jF6rusWw8rvsbjdkOnC6BYlyFLeqrVujIdCZPKpN MATm6vgRV92hgtRiD4+WKpDCM6ENM/rlo3ZN6c48MTi76mhb6m/5kHjZePSSxl2YHXD/ G9xs4O8eQWf1g+z7F/wQi63495A+gi99047OQXXP2N4jbS5CQyIqu0NawFf/RlxXO3yl hXsw== X-Gm-Message-State: AOAM531MvXKtAo19hMAFT29Vufr4junE4ed9+psDQq/bCkTjztHfvlL+ Jq6OPltiugR3EBK4L7VSYKg= X-Google-Smtp-Source: ABdhPJxCxohHYXdy/+Y5r908svPiZvM2neazjnpGgfW3PmZRi4+3OaI2hKDtsjtVSz3cLhukTDWUqg== X-Received: by 2002:a7b:c048:: with SMTP id u8mr8763394wmc.113.1630068714402; Fri, 27 Aug 2021 05:51:54 -0700 (PDT) Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id o8sm10021131wmq.21.2021.08.27.05.51.52 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 27 Aug 2021 05:51:53 -0700 (PDT) Subject: Re: bug#39452: [PATCH] vc-git-state fails for filenames with wildcards To: Juri Linkov References: <83h802g77h.fsf@gnu.org> <8f427281-510c-30c3-995f-364e22d9c1e2@yandex.ru> <85y2texxso.fsf@gmail.com> <52f47a82-b93e-d9c2-ee94-752b289d4b96@yandex.ru> <85lfp7ygk3.fsf@gmail.com> <87pmxwgcps.fsf@gnus.org> <1cb67253-c43f-caac-ee83-1241edaaeeaa@yandex.ru> <87k0lildtq.fsf@gnus.org> <6e6060f9-0259-9b12-f925-a1a85c6757c4@yandex.ru> <877dgoutmz.fsf@gnus.org> <2602aeaf-0f02-e744-2b4f-012e73e012e8@yandex.ru> <87y28nbky4.fsf@linkov.net> From: Dmitry Gutov Message-ID: Date: Fri, 27 Aug 2021 15:51:51 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <87y28nbky4.fsf@linkov.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 0.4 (/) X-Debbugs-Envelope-To: 39452 Cc: Lars Ingebrigtsen , Noam Postavsky , 39452@debbugs.gnu.org, Wolfgang.Scherer@gmx.de X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.6 (/) On 27.08.2021 09:05, Juri Linkov wrote: >>> If we've seen one piece of code break here already, then perhaps >>> reverting and moving to the other (safer, but more invasive) approach is >>> the right way to go. >> >> Fair enough. >> >> Pushed the other patch with a couple of small tweaks. > > This broke vc-rename-file that now fails with > > (error Failed (status 128): git --no-pager mv -f -- :(literal)/tmp/gitrepo/subdir/file1 :(literal)/tmp/gitrepo/subdir/file2) > fatal: bad source, source=subdir/:(literal)/tmp/gitrepo/subdir/file1, destination=subdir/:(literal)/tmp/gitrepo/subdir/file2 It was probably broken by the original change, no? Just not fixed by any of the subsequent repairs. > Can be fixed with > > diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el > index 02ca022ad4..88e015fc9d 100644 > --- a/lisp/vc/vc-git.el > +++ b/lisp/vc/vc-git.el > @@ -1559,7 +1559,7 @@ vc-git-delete-file > (vc-git-command nil 0 (vc-git--literal-pathspecs file) "rm" "-f" "--")) > > (defun vc-git-rename-file (old new) > - (vc-git-command nil 0 (vc-git--literal-pathspecs (list old new)) "mv" "-f" "--")) > + (vc-git-command nil 0 (list old new) "mv" "-f" "--")) > > (defun vc-git-mark-resolved (files) > (vc-git-command nil 0 (vc-git--literal-pathspecs files) "add")) Looks like the proper fix, thanks. Feel free to push it right away, if you like. Would be great to add some test, though. vc-tests.el currently doesn't exercise vc-rename-file at all. From debbugs-submit-bounces@debbugs.gnu.org Fri Aug 27 13:15:26 2021 Received: (at 39452) by debbugs.gnu.org; 27 Aug 2021 17:15:26 +0000 Received: from localhost ([127.0.0.1]:52877 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mJfRu-0004Sn-0Y for submit@debbugs.gnu.org; Fri, 27 Aug 2021 13:15:26 -0400 Received: from relay11.mail.gandi.net ([217.70.178.231]:49273) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mJfRs-0004Jk-Cf for 39452@debbugs.gnu.org; Fri, 27 Aug 2021 13:15:24 -0400 Received: (Authenticated sender: juri@linkov.net) by relay11.mail.gandi.net (Postfix) with ESMTPSA id AC2C1100005; Fri, 27 Aug 2021 17:15:15 +0000 (UTC) From: Juri Linkov To: Dmitry Gutov Subject: Re: bug#39452: [PATCH] vc-git-state fails for filenames with wildcards Organization: LINKOV.NET References: <83h802g77h.fsf@gnu.org> <8f427281-510c-30c3-995f-364e22d9c1e2@yandex.ru> <85y2texxso.fsf@gmail.com> <52f47a82-b93e-d9c2-ee94-752b289d4b96@yandex.ru> <85lfp7ygk3.fsf@gmail.com> <87pmxwgcps.fsf@gnus.org> <1cb67253-c43f-caac-ee83-1241edaaeeaa@yandex.ru> <87k0lildtq.fsf@gnus.org> <6e6060f9-0259-9b12-f925-a1a85c6757c4@yandex.ru> <877dgoutmz.fsf@gnus.org> <2602aeaf-0f02-e744-2b4f-012e73e012e8@yandex.ru> <87y28nbky4.fsf@linkov.net> Date: Fri, 27 Aug 2021 20:10:13 +0300 In-Reply-To: (Dmitry Gutov's message of "Fri, 27 Aug 2021 15:51:51 +0300") Message-ID: <87o89ieruy.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 39452 Cc: Lars Ingebrigtsen , Noam Postavsky , 39452@debbugs.gnu.org, Wolfgang.Scherer@gmx.de X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >> - (vc-git-command nil 0 (vc-git--literal-pathspecs (list old new)) "mv" "-f" "--")) >> + (vc-git-command nil 0 (list old new) "mv" "-f" "--")) > > Looks like the proper fix, thanks. Feel free to push it right away, if > you like. Pushed now. I wonder how many git commands still remain broken and will go unnoticed to the release? Such as vc-git-delete-file and vc-git-mark-resolved, etc. > Would be great to add some test, though. vc-tests.el currently doesn't > exercise vc-rename-file at all. Indeed, covering all git commands will avoid the danger of breaking some commands. From debbugs-submit-bounces@debbugs.gnu.org Fri Aug 27 15:57:17 2021 Received: (at 39452) by debbugs.gnu.org; 27 Aug 2021 19:57:17 +0000 Received: from localhost ([127.0.0.1]:53083 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mJhyX-0008GI-J2 for submit@debbugs.gnu.org; Fri, 27 Aug 2021 15:57:17 -0400 Received: from mout.gmx.net ([212.227.15.19]:51313) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mJhyU-0008G3-OI for 39452@debbugs.gnu.org; Fri, 27 Aug 2021 15:57:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1630094227; bh=dD8hyRuVSMlbbtTVarXzirSyBgfu5QiK4X1QBPsspCc=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=Yiql/6yl5ZfZnrmSGksEuRyeK01aR3H39MT9oNcEy1GtIHyza/1lHZzphH4dwpC0v mvKeuDnq/lJZb7ijDq8afMBhE0uVsDb6a5sIIrrE5E7xiOcOyN1b5+Pbo7OUirKgva qinHAAPvZi5hoSzJUzqsKrw6Sq5aNC7OWiAhciJA= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from strobelfs ([178.1.124.4]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1N3KPg-1n2M9B0Th4-010N8Q; Fri, 27 Aug 2021 21:57:07 +0200 From: Stephen Berman To: Juri Linkov Subject: Re: bug#39452: [PATCH] vc-git-state fails for filenames with wildcards References: <83h802g77h.fsf@gnu.org> <8f427281-510c-30c3-995f-364e22d9c1e2@yandex.ru> <85y2texxso.fsf@gmail.com> <52f47a82-b93e-d9c2-ee94-752b289d4b96@yandex.ru> <85lfp7ygk3.fsf@gmail.com> <87pmxwgcps.fsf@gnus.org> <1cb67253-c43f-caac-ee83-1241edaaeeaa@yandex.ru> <87k0lildtq.fsf@gnus.org> <6e6060f9-0259-9b12-f925-a1a85c6757c4@yandex.ru> <877dgoutmz.fsf@gnus.org> <2602aeaf-0f02-e744-2b4f-012e73e012e8@yandex.ru> <87y28nbky4.fsf@linkov.net> <87o89ieruy.fsf@mail.linkov.net> Date: Fri, 27 Aug 2021 21:57:06 +0200 In-Reply-To: <87o89ieruy.fsf@mail.linkov.net> (Juri Linkov's message of "Fri, 27 Aug 2021 20:10:13 +0300") Message-ID: <87a6l2d5kd.fsf@gmx.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:pnijYma1LRN6BEGImO0kXU1UIczjouhiNIeyoJbPIp7Proi3lSz KVQ6xCeVzhMrf6Dk65OU+YCulPntpJwDtxd6gTOFAtEs3bbCmrdtyodILJ17FfOXkwQTICO usZ1lFkxtLReWR/Yq3Ewr6SDAkqy9zQz7Q0B2vqCBm8Kd+JDVsDzVK903sFsPxR3+WlP4CY 96qhVZMnt4dfBV8I151tg== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:r5c8r29RUqw=:SlodGS0dWMFd6bvlx9+FyB spNh1KN/V6pJ2iHbtmPWyjtCtDMesHNx5DYGUYVy/NtuIzyNbPeEObFwsOfsqIyqU/yGtwazc W5tZhjZM5qrp5PK8B6f92442beR+QwCr8DhO7YlsVmbxuZvkMLbKOcGkTWaRPu2cfueXDeuFi fjWqLqjS19JZRickYjb8mns9tWdna5Ug4RggVPvj7qSAABBAoLuU4oKVyPv6eh8uTNBBM8P23 SLSk1ft5PsiW1CY6Ke7qHCVh3gZhNU/XPzvzLCEYnh703ZcO3kIKhk2bbaBLJz3SeJGt/0Cgz g+GDgTr/0Nh3JqVKvhJ6TNR5x/IXtOMfM/kpgEbINrvJO7JavM1yfvvWjCtvmdHZn7i+SdyfQ NAlaAHxXVyn9z61SwqgNygrwiLzWSVcWmRsoJ8E+YhaYPSP+MqWZkCseIteCzCK0UScl9IIDu 5ycJW/E5f7KaNzcM8Jaryi01EIWzI06PCFel2LTj8SqyiXxrei1ZF6bxBYS1FJDaez28UB3nl 1c2lGozLpf8gHay/fB1zsnlBxo7BGHVNuWIMvkW/5Vr7splZk9BEubc9VLhnVfMEMgF98dMo3 cYsP8HnmybvgcHL5Ur6UGmJgSljv7UNAS67xQuFpzOnySCgXyhTOPs+vMFaXnmBnpINjub9Bz APT3DjC33Kmh3o9tu2PXso1qht/tG2Rdq0Smi/W0FHKqpI84fEjl2YLOSBsBQ329QL9Ix3qKq cDVUYyja3N6ngokwJ6mWaFU/uhgoKtvTYW1mUB8ko6C2kB4CHPbZ/GSvviLRLEoabWNIxFsxd rE+5A9R7wS3XwkHS37shBKkL0SYGFrGbTOzYoqe+J+ohnyYwG2hY8ATb+s6EYIaDObkAaqtB2 MH9ideFGaOPg1vB3VW8dczC+m5oOV3DOzh/VVz4UNg384nb+rqwdZ10awQZdBS6ZkIzCWRKSc hK3ybFGZq+PAnHNq3/c12ABeAblWmc46CG34v4Juk7OnLlDlhU6xChDYWJz2z4sSZnYIjteiF hEbcghrJc4w2uurgf9B7CtDukD2YwO4DbHUiq5etFIifFoOieMJMvkiGemqEewMhZ+eTyjJ5Q m+W7jxKZ2ieUW4yRwnwsqURCZKPyPRrOWruVdMCakzA8tZzgnBonK4/gQ== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 39452 Cc: Lars Ingebrigtsen , Wolfgang.Scherer@gmx.de, Noam Postavsky , 39452@debbugs.gnu.org, Dmitry Gutov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) On Fri, 27 Aug 2021 20:10:13 +0300 Juri Linkov wrote: >>> - (vc-git-command nil 0 (vc-git--literal-pathspecs (list old new)) "mv" >>> "-f" "--")) >>> + (vc-git-command nil 0 (list old new) "mv" "-f" "--")) >> >> Looks like the proper fix, thanks. Feel free to push it right away, if >> you like. > > Pushed now. > > I wonder how many git commands still remain broken > and will go unnoticed to the release? Such as > vc-git-delete-file and vc-git-mark-resolved, etc. > >> Would be great to add some test, though. vc-tests.el currently doesn't >> exercise vc-rename-file at all. > > Indeed, covering all git commands will avoid the danger of breaking > some commands. I just discovered that some code I have that uses vc-print-log-internal broke after the literal-pathspecs change; specifically, my code passes a directory name beginning with "~/" to vc-print-log-internal, and this had worked fine till that change, which broke it, and I found I have to wrap the directory name in expand-file-name to make the code work again. Is this expected fallout from that change or was I perhaps misusing vc-print-log-internal and was just lucky that it had worked before? Steve Berman From debbugs-submit-bounces@debbugs.gnu.org Fri Aug 27 18:47:27 2021 Received: (at 39452) by debbugs.gnu.org; 27 Aug 2021 22:47:28 +0000 Received: from localhost ([127.0.0.1]:53139 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mJkdC-0003sN-IQ for submit@debbugs.gnu.org; Fri, 27 Aug 2021 18:47:27 -0400 Received: from mail-wr1-f47.google.com ([209.85.221.47]:45761) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mJkd7-0003s7-0Y for 39452@debbugs.gnu.org; Fri, 27 Aug 2021 18:47:25 -0400 Received: by mail-wr1-f47.google.com with SMTP id n5so12526786wro.12 for <39452@debbugs.gnu.org>; Fri, 27 Aug 2021 15:47:20 -0700 (PDT) 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=WDvowFPxpG7n5DDZyICVh7qI+YD1jNUIHyheek00Li0=; b=JxYF2Ov/uoFZ/5FYoy7B3WVJhglPStI9yyqrO7gDjHh+jhL7OREyzDo81zg+ljGmTH KGMsAIwbDdnHb0iv8+3mvjhnoh8LSupKC0p/bmfxSuqBvr1Wh6xo9OtUw57n15F0U/7E +2cCUVuGbzVcgCSag/5cmq+4ukhgCpGMNkN8zCy9Xk102J7lgxYL2tPHSLlvXztzroZB cID+FgW9GHKOGVc2J2HPmHFXQBlJY6gG2PWOQ2bJOPAX5Ah03MbJBNv0musXt+628u6k pmqfScM8FUa6X5wNZP8kzc/fk9FyG20tK+pO4FA0+GupaJBVluRVcZpjKBOl+SqrogRM V08Q== 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=WDvowFPxpG7n5DDZyICVh7qI+YD1jNUIHyheek00Li0=; b=QYZpSuhVF3aSCtSp7X53yVUbuYStUaZ7JfzXzbaHwoj5ixkmESXOp/ZieFUGy0ZnRW 0eM3dNFrmRvxbKiWdzWTho/VzFFoGevym/6/orS5i4I/DHIrtr6kh8JH6+n3Niyn+9ZG Z0yWZM3ZjsTSF5ZS+5R5SMITdo58ANXe5ELa86IHiTygXgAyXpcgI+gsk5aqW0eA/K7s LbCUybheMqQWKhtmklMLIXGpdmkaO+oKDQ9FIWCDDkTnuWOZOby7besNmJ4F+f5gDfHz iL88Q3kTO1EcleuEwpeMmSo+ETOCyUX1b3Ldj7akK4aI7VcPs05db+5P9XO4JUpwqCuh PvbA== X-Gm-Message-State: AOAM532+qrzgh0Tra/yKVl+1rPIgc58QwFSrlQtIna08TN0g6NpU2qJq gio1Rf5to3Ib3WhPN3q1+rc= X-Google-Smtp-Source: ABdhPJwJU3IHtpBV4953QM+UxvA7SH3Y2LC2ZjXi156W0b478RPH7fmx9yXIt5rnXx9hFK3hbG44xA== X-Received: by 2002:a5d:678f:: with SMTP id v15mr13155498wru.196.1630104434897; Fri, 27 Aug 2021 15:47:14 -0700 (PDT) Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id a129sm5096727wme.14.2021.08.27.15.47.13 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 27 Aug 2021 15:47:14 -0700 (PDT) Subject: Re: bug#39452: [PATCH] vc-git-state fails for filenames with wildcards To: Juri Linkov References: <83h802g77h.fsf@gnu.org> <8f427281-510c-30c3-995f-364e22d9c1e2@yandex.ru> <85y2texxso.fsf@gmail.com> <52f47a82-b93e-d9c2-ee94-752b289d4b96@yandex.ru> <85lfp7ygk3.fsf@gmail.com> <87pmxwgcps.fsf@gnus.org> <1cb67253-c43f-caac-ee83-1241edaaeeaa@yandex.ru> <87k0lildtq.fsf@gnus.org> <6e6060f9-0259-9b12-f925-a1a85c6757c4@yandex.ru> <877dgoutmz.fsf@gnus.org> <2602aeaf-0f02-e744-2b4f-012e73e012e8@yandex.ru> <87y28nbky4.fsf@linkov.net> <87o89ieruy.fsf@mail.linkov.net> From: Dmitry Gutov Message-ID: Date: Sat, 28 Aug 2021 01:47:12 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <87o89ieruy.fsf@mail.linkov.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 0.4 (/) X-Debbugs-Envelope-To: 39452 Cc: Lars Ingebrigtsen , Noam Postavsky , 39452@debbugs.gnu.org, Wolfgang.Scherer@gmx.de X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.6 (/) On 27.08.2021 20:10, Juri Linkov wrote: >>> - (vc-git-command nil 0 (vc-git--literal-pathspecs (list old new)) "mv" "-f" "--")) >>> + (vc-git-command nil 0 (list old new) "mv" "-f" "--")) >> >> Looks like the proper fix, thanks. Feel free to push it right away, if >> you like. > > Pushed now. Thank you. > I wonder how many git commands still remain broken > and will go unnoticed to the release? Such as > vc-git-delete-file and vc-git-mark-resolved, etc. Those two -- probably not. But you're welcome to try and report any problems. I'll try to fix and regressions now, but if people think we should go back to a different approach (for example, go back to the other solution, but use it in an opt-in fashion by passing --literal-pathspecs from every applicable command), we can do so too. >> Would be great to add some test, though. vc-tests.el currently doesn't >> exercise vc-rename-file at all. > > Indeed, covering all git commands will avoid the danger of breaking > some commands. Volunteers welcome. From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 28 11:07:13 2021 Received: (at 39452) by debbugs.gnu.org; 28 Aug 2021 15:07:13 +0000 Received: from localhost ([127.0.0.1]:54818 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mJzvN-0003Sp-KO for submit@debbugs.gnu.org; Sat, 28 Aug 2021 11:07:13 -0400 Received: from quimby.gnus.org ([95.216.78.240]:43644) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mJzvM-0003Sb-6k for 39452@debbugs.gnu.org; Sat, 28 Aug 2021 11:07:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=gwV7mNgiXmKilD+BdZGZ+OFefyxkQlYddj/tXEwohok=; b=r6VQfqjMC1xqwnMCglzRn+4HEp +FIq+tqMxxlifljKNZ5/vc49XxqBegVhjxafPmc0w0POHeSADIMQHx78badCJJ4O7QnQ7pJO8yz19 MP/A6r10oVb2BvNkamPxrSpHJ6NCJun/UgKbso0a1EGNCIyys0/e2CvWLEEMCwYEUpgo=; Received: from [84.212.220.105] (helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mJzvB-0004d7-ME; Sat, 28 Aug 2021 17:07:05 +0200 From: Lars Ingebrigtsen To: Stephen Berman Subject: Re: bug#39452: [PATCH] vc-git-state fails for filenames with wildcards References: <83h802g77h.fsf@gnu.org> <8f427281-510c-30c3-995f-364e22d9c1e2@yandex.ru> <85y2texxso.fsf@gmail.com> <52f47a82-b93e-d9c2-ee94-752b289d4b96@yandex.ru> <85lfp7ygk3.fsf@gmail.com> <87pmxwgcps.fsf@gnus.org> <1cb67253-c43f-caac-ee83-1241edaaeeaa@yandex.ru> <87k0lildtq.fsf@gnus.org> <6e6060f9-0259-9b12-f925-a1a85c6757c4@yandex.ru> <877dgoutmz.fsf@gnus.org> <2602aeaf-0f02-e744-2b4f-012e73e012e8@yandex.ru> <87y28nbky4.fsf@linkov.net> <87o89ieruy.fsf@mail.linkov.net> <87a6l2d5kd.fsf@gmx.net> Date: Sat, 28 Aug 2021 17:07:01 +0200 In-Reply-To: <87a6l2d5kd.fsf@gmx.net> (Stephen Berman's message of "Fri, 27 Aug 2021 21:57:06 +0200") Message-ID: <87ilzpk3qi.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.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 @@CONTACT_ADDRESS@@ for details. Content preview: Stephen Berman writes: > I just discovered that some code I have that uses vc-print-log-internal > broke after the literal-pathspecs change; specifically, my code passes a > directory name beginning with "~/" to vc-print-lo [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 39452 Cc: Wolfgang.Scherer@gmx.de, Dmitry Gutov , Noam Postavsky , 39452@debbugs.gnu.org, Juri Linkov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Stephen Berman writes: > I just discovered that some code I have that uses vc-print-log-internal > broke after the literal-pathspecs change; specifically, my code passes a > directory name beginning with "~/" to vc-print-log-internal, and this > had worked fine till that change, which broke it, and I found I have to > wrap the directory name in expand-file-name to make the code work again. > Is this expected fallout from that change or was I perhaps misusing > vc-print-log-internal and was just lucky that it had worked before? I think it's reasonable to expect parameters to `vc-print-log-internal' to have been expanded first, but that should be documented, at least. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 28 11:44:54 2021 Received: (at 39452) by debbugs.gnu.org; 28 Aug 2021 15:44:54 +0000 Received: from localhost ([127.0.0.1]:54860 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mK0Vm-0006cZ-79 for submit@debbugs.gnu.org; Sat, 28 Aug 2021 11:44:53 -0400 Received: from mout.gmx.net ([212.227.17.22]:45513) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mK0Vg-0006cC-Ax for 39452@debbugs.gnu.org; Sat, 28 Aug 2021 11:44:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1630165476; bh=EfVWwzB1cRq02yc74I2YB/ND2YkHeO+7s6Twq4D6Fug=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=LkNdyqwi42C2HVwAZJRRBbMkBZFzKo0hy8kT1g1y5HDa4dx2hf0279RL7Gg1WmIdb CTukUu0fOjQzzwT5NYYypPkz7LtN3TORKz/Yy7LsND1P+zNrAVhow626TwwAE+BcZ4 yAB7Zii0TeB4CQ453HJ/yzSNxsWzonZFZNkK3spg= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from strobelfs ([178.1.124.4]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MWzjt-1mVDhN2kmn-00XJ1I; Sat, 28 Aug 2021 17:44:36 +0200 From: Stephen Berman To: Lars Ingebrigtsen Subject: Re: bug#39452: [PATCH] vc-git-state fails for filenames with wildcards References: <83h802g77h.fsf@gnu.org> <8f427281-510c-30c3-995f-364e22d9c1e2@yandex.ru> <85y2texxso.fsf@gmail.com> <52f47a82-b93e-d9c2-ee94-752b289d4b96@yandex.ru> <85lfp7ygk3.fsf@gmail.com> <87pmxwgcps.fsf@gnus.org> <1cb67253-c43f-caac-ee83-1241edaaeeaa@yandex.ru> <87k0lildtq.fsf@gnus.org> <6e6060f9-0259-9b12-f925-a1a85c6757c4@yandex.ru> <877dgoutmz.fsf@gnus.org> <2602aeaf-0f02-e744-2b4f-012e73e012e8@yandex.ru> <87y28nbky4.fsf@linkov.net> <87o89ieruy.fsf@mail.linkov.net> <87a6l2d5kd.fsf@gmx.net> <87ilzpk3qi.fsf@gnus.org> Date: Sat, 28 Aug 2021 17:44:35 +0200 In-Reply-To: <87ilzpk3qi.fsf@gnus.org> (Lars Ingebrigtsen's message of "Sat, 28 Aug 2021 17:07:01 +0200") Message-ID: <877dg5fuak.fsf@gmx.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:WvQh9TQWHVUmtAVPkcbodD5IRdBbozI+nqCQkQDRwssLD5/e0LJ SELGNoAbNL1bEcc9Z3XDrifNEBZZ968IJMcEbfuDyxxXbWeAOyGIPSKGCkVuuIphI3UHMvS 3m9wHuVo7YYvsubTjeB/VRLQR/7rKP7vb4LJG4vCNdyHwYL4MpXS0vTUYU+NPjnpMj6EjWU Vdgi1nGidaOKabgPGb0Rw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:9GjbVSkwfOo=:be72OwmtXvRpoxGqj/m2BT tow5VbPYZ7mw/LaBGRe1GdMojoYLdEXhtmEbdj8PYN+Ds5c46wDubLNCdTqxmeFh2yM8pwuqP Mz3Kl383v2iOn/NPXsfRfCUh7GaV9ybOWkVndCzWIitGknP0Eu4N5mXkI6XjzAu0T9onTPeq5 /iJuUSsFu7KPT+XRqj7gBNpaQhl90fEgaForJQNA9vPrQHPc3ZxmhR88gGmpq2dtnV76O9gsh PyyS1cstoX6w0itEM7ny9UfBmHwv6j4aRhf43oiOZyVIzzOwB2wwjDBxk8npDCzL/p2xTIVf9 W351vmcoS4AdB2RqhUM04hYRP6kxUsrKnspZTEfvqBfQINzNGsNQDlV4Kgjx1WSx3S7zufSwp sE3bXY+pHJBerU1oS0cZ3jmEQk7SRtno21ttplV/x6HZbSJnPgPFwf45Ys/8iyVVwa4iXB+xC 1VwjZdpfk9zNKsAeeW/N/UzfbiSUCn4BlC5QdfN+izNe/0GbqAMXuu3Y958CtmyyJxEG/EhE9 GhZNSJi5LT5uSAdWoLTU2/8I/OascLoY+JfwSrVr2IVlMAOZuOdCMRTNJqmfaYJvsLNAoLWKq SVXrRE7qLqHKf5+w4Mrc8UmFPVxKSsAG9HkJVlEyCEvEHZ3/KMnceAoGUIb3XYUodstxEOPdc AS4RL80lDvf9/u4prL1iO3YSIVFxPLhzOIa7ArPsYJdxrnHzciErjHNbDiTQpaXm93ySqIeSm pzhKqV+fqEbui3rzTk6gsVG+C6J/HX5wojyGGsjEOYogrSAClI5QmQe6CP9p5fz5g1PXKP9yv /QEd+Tce2MP3EfyXZR68JbP3NJFfqhF3uyoTOQposo/49oRtifWOzBXFShNWrZ9KgP7uc8jLj ft6tgRZd3ZRaxyU3kMCuZ3PRWU7r7c/q/th+n8d8CMNIb0rUv5qWTX5uukurwgG7//8XQiVkE SKn/rd6hTknmMk1tV/h9eudh5MQBz6FgVGaD9TCViXZGHqjWztlUw1vn+1ThWTZFZsRcPMy32 owIuSonr8Z+AFlJBAFWJaQa7tO0HwQz+0ZzL0jTW5TKwmVnEKparSX+C6MT93mQTEgpO6qDk+ qC95wZwtGkTayrM9SXFARqYkc6RM0Uf6FZiMssR044UvsiN60JU84tHaQ== X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 39452 Cc: Wolfgang.Scherer@gmx.de, Dmitry Gutov , Noam Postavsky , 39452@debbugs.gnu.org, Juri Linkov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On Sat, 28 Aug 2021 17:07:01 +0200 Lars Ingebrigtsen wrote: > Stephen Berman writes: > >> I just discovered that some code I have that uses vc-print-log-internal >> broke after the literal-pathspecs change; specifically, my code passes a >> directory name beginning with "~/" to vc-print-log-internal, and this >> had worked fine till that change, which broke it, and I found I have to >> wrap the directory name in expand-file-name to make the code work again. >> Is this expected fallout from that change or was I perhaps misusing >> vc-print-log-internal and was just lucky that it had worked before? > > I think it's reasonable to expect parameters to `vc-print-log-internal' > to have been expanded first, but that should be documented, at least. I'm not sure it needs to be documented, it is internal, after all. I'm using it because I want a different UI than what vc-print-log provides. The latter passes the file name to vc-print-log-internal already expanded; I should have checked that when I decided to use the internal function. But I don't see at first glance why the unexpanded file name in the latter worked prior to the literal-pathspecs change but not afterwards. Steve Berman From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 28 11:48:29 2021 Received: (at 39452) by debbugs.gnu.org; 28 Aug 2021 15:48:29 +0000 Received: from localhost ([127.0.0.1]:54864 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mK0ZJ-0000QL-8B for submit@debbugs.gnu.org; Sat, 28 Aug 2021 11:48:29 -0400 Received: from quimby.gnus.org ([95.216.78.240]:44164) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mK0ZG-0000Q5-Rj for 39452@debbugs.gnu.org; Sat, 28 Aug 2021 11:48:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=kkDvfYS3VZu8pBDJJqfpBR5i5jargkfMhXNigKhaRe0=; b=uPKaOtVup/a/0CGkmXP4wsew10 pPfGqGbw41B45C5oFB+JIaYD+hFhcWQ1KN8guYMiE6tRFqwvxD6fbJbph3W1nQGXjCSOLxQMKienQ 11M3H13g1FDNpUs5uvFvWWXZF+wt+AMnqNz/cfGItGXhSeNGf0xrwRhHczeYgFmJrdJ8=; Received: from [84.212.220.105] (helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mK0Z6-0005A9-2h; Sat, 28 Aug 2021 17:48:20 +0200 From: Lars Ingebrigtsen To: Stephen Berman Subject: Re: bug#39452: [PATCH] vc-git-state fails for filenames with wildcards References: <83h802g77h.fsf@gnu.org> <8f427281-510c-30c3-995f-364e22d9c1e2@yandex.ru> <85y2texxso.fsf@gmail.com> <52f47a82-b93e-d9c2-ee94-752b289d4b96@yandex.ru> <85lfp7ygk3.fsf@gmail.com> <87pmxwgcps.fsf@gnus.org> <1cb67253-c43f-caac-ee83-1241edaaeeaa@yandex.ru> <87k0lildtq.fsf@gnus.org> <6e6060f9-0259-9b12-f925-a1a85c6757c4@yandex.ru> <877dgoutmz.fsf@gnus.org> <2602aeaf-0f02-e744-2b4f-012e73e012e8@yandex.ru> <87y28nbky4.fsf@linkov.net> <87o89ieruy.fsf@mail.linkov.net> <87a6l2d5kd.fsf@gmx.net> <87ilzpk3qi.fsf@gnus.org> <877dg5fuak.fsf@gmx.net> Date: Sat, 28 Aug 2021 17:48:15 +0200 In-Reply-To: <877dg5fuak.fsf@gmx.net> (Stephen Berman's message of "Sat, 28 Aug 2021 17:44:35 +0200") Message-ID: <87a6l1in9c.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.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 @@CONTACT_ADDRESS@@ for details. Content preview: Stephen Berman writes: > But I don't see at first glance why the unexpanded file name > in the latter worked prior to the literal-pathspecs change but not > afterwards. Isn't that what that change does -- make git interpret paths literally? (So that you can have file names like "~" and "*" in your repo.) Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 39452 Cc: Wolfgang.Scherer@gmx.de, Dmitry Gutov , Noam Postavsky , 39452@debbugs.gnu.org, Juri Linkov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Stephen Berman writes: > But I don't see at first glance why the unexpanded file name > in the latter worked prior to the literal-pathspecs change but not > afterwards. Isn't that what that change does -- make git interpret paths literally? (So that you can have file names like "~" and "*" in your repo.) -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 28 12:02:44 2021 Received: (at 39452) by debbugs.gnu.org; 28 Aug 2021 16:02:44 +0000 Received: from localhost ([127.0.0.1]:54875 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mK0n2-0000pM-PK for submit@debbugs.gnu.org; Sat, 28 Aug 2021 12:02:44 -0400 Received: from mout.gmx.net ([212.227.15.19]:42569) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mK0mx-0000p1-SL for 39452@debbugs.gnu.org; Sat, 28 Aug 2021 12:02:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1630166548; bh=/2o1ApqitFfxWOmJw4KgscrdT0GMIMbBNqPGM9crl88=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=ZJyZOHBty7kpy5bbhE2L+CZMFvj7zH4znBB3tVtdt/xaaQl79IN8l5z1sGAHh4xai qtoEcNBNQwq8znAJq5JUX3ChjAR4Zr7qNgJuT7jGUTkMUn2MvdwmVAcDuOhgNYtaIG mEqwrhTc35XDe8HKtpHDWpipbk20wFukdP1IKvcQ= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from strobelfs ([178.1.124.4]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1N9Mta-1n7ahk1hcS-015KAx; Sat, 28 Aug 2021 18:02:28 +0200 From: Stephen Berman To: Lars Ingebrigtsen Subject: Re: bug#39452: [PATCH] vc-git-state fails for filenames with wildcards References: <83h802g77h.fsf@gnu.org> <8f427281-510c-30c3-995f-364e22d9c1e2@yandex.ru> <85y2texxso.fsf@gmail.com> <52f47a82-b93e-d9c2-ee94-752b289d4b96@yandex.ru> <85lfp7ygk3.fsf@gmail.com> <87pmxwgcps.fsf@gnus.org> <1cb67253-c43f-caac-ee83-1241edaaeeaa@yandex.ru> <87k0lildtq.fsf@gnus.org> <6e6060f9-0259-9b12-f925-a1a85c6757c4@yandex.ru> <877dgoutmz.fsf@gnus.org> <2602aeaf-0f02-e744-2b4f-012e73e012e8@yandex.ru> <87y28nbky4.fsf@linkov.net> <87o89ieruy.fsf@mail.linkov.net> <87a6l2d5kd.fsf@gmx.net> <87ilzpk3qi.fsf@gnus.org> <877dg5fuak.fsf@gmx.net> <87a6l1in9c.fsf@gnus.org> Date: Sat, 28 Aug 2021 18:02:27 +0200 In-Reply-To: <87a6l1in9c.fsf@gnus.org> (Lars Ingebrigtsen's message of "Sat, 28 Aug 2021 17:48:15 +0200") Message-ID: <8735qtftgs.fsf@gmx.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:CJAn7ZRf3Wfz3DSjb7wZ2+JwJW4lV2BIma2uGyaWlo2r0eMbGTJ hNgj7Iz06fLIPOQlEMUX5fMslxPRJqY2hR+DAS/Rvy/oPtTFAjZn1PBuTUNaq4GE+IZlNDE x8Pclm5JyaqD4FjhMAs10EknNadk0Hu8XTsYVCnvVkUeSsegkdf7RHfe7peB1oX00SJrP6x ixiBR7wgvS9Zh8Ghpl8UA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:rq29DySVncA=:GjAWRN/z48/v+4PlU1s3DB mLak6odZhav61srg6735+IU0jSMC8U0QdFWD9Ibbdokg5q+W2IgT/rPMSxKmUY9swWQFui9C/ kuGEYbh4FUEbye7twS5+yudu/NBJOHBRU0koMJ6CEjDqKyOH+3TEbQDSZJw2kCy0XzJ5rn7XC QXmjp2Kq2NymtcT9rLxSVVMAWdebdVhvsLILN025gB5/+pR8M0zu6WxoVX1OkP7/+Gp9gR/2z h97GYGVDK9pjBd5ekm7M2QYBi/JR1//RWLG5XR21C6nF9sTUWCiQEbxw5gGOzUK0EBh33Tckb PwvsGD+NZ+jP2ws6+U6H08c8aFH86sukmmM1ouuZNfGZ7v+amN7KEGaeE3ziI4aBD2fB/0/dr fXrBymYlTmnEw8jT9lkoXQlZt401/vOxpdk/EeG+J8U28WMOXJtpQlcuKT8gStcqsAl5BvbNG 927fHlO+kSsi4NFgm2uOkv46KCIz0ur/KyxIM0IWeqdAlpWeUzd4oGCICdr7q5ldYZYJVrzIl RaUfdLMszNGReB4KY0TD+sp0/gHgbjF90ty2841lewx0lyyh4CwoPg2uW1Lruw+Rfj9q62G/S YUzu59CJq+7dzSnxpxqrWwJ+bh0PvXq78cT+w4Ca0l8IwnesyXqwWI/2r3t2LJcGhi4wv78nR qd+8U0Bhhp3F1/KbSvZcLl1Lh+alq8kNk3yW9SZIIjo7pMuUIOWHzHnfu8ALY+IXfLmN0fXzk nm56wTgbraDwIfRijLr87JY2BNK0bjicY5PLBJfdvDdEmMRj8cSMmIVy+UsEAt8+vwJ4QxIYH F84doCAun7ssLLP+Kw6JmKsF4106S3Aqgol14XNGzCX4Fz71gZHxU+tzQ+BkbjNf5A+fTxHBu s74ZobVqILawmcRu1B+5EZnR8wa6vG225rY14FLl8GM2etFUW8DQfQB14knfGhnGr4d6HoxXD Hs6VYRmndt9suMpnKLRSkq+Nn+SREDgm6h3vTHpR5AfY/8aso8fJ0ZFvDpFksDjOgl2dZOsn8 zY8VaX7TEC25fmwA8rOOczHlc0d9d01iax6y3qlCeRm9xfMiVpTrpq2Aa2Ha21/MM/OQNNNaZ 1Crb3dba4yjUcVUGygP8HEb3Zyj9evc0xbu7yOQu+0OVsuqj29SvicCTw== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 39452 Cc: Wolfgang.Scherer@gmx.de, Dmitry Gutov , Noam Postavsky , 39452@debbugs.gnu.org, Juri Linkov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) On Sat, 28 Aug 2021 17:48:15 +0200 Lars Ingebrigtsen wrote: > Stephen Berman writes: > >> But I don't see at first glance why the unexpanded file name >> in the latter worked prior to the literal-pathspecs change but not >> afterwards. > > Isn't that what that change does -- make git interpret paths literally? > (So that you can have file names like "~" and "*" in your repo.) Ah, that makes sense and explains why it broke my code, thanks. (My first glance at the change was very superficial, and you've saved me from having to take a second glance :-). Steve Berman From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 28 18:19:35 2021 Received: (at 39452) by debbugs.gnu.org; 28 Aug 2021 22:19:36 +0000 Received: from localhost ([127.0.0.1]:55141 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mK6fn-0002Ai-Ma for submit@debbugs.gnu.org; Sat, 28 Aug 2021 18:19:35 -0400 Received: from mail-wr1-f50.google.com ([209.85.221.50]:43930) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mK6fi-0002AP-0e for 39452@debbugs.gnu.org; Sat, 28 Aug 2021 18:19:34 -0400 Received: by mail-wr1-f50.google.com with SMTP id b6so16272731wrh.10 for <39452@debbugs.gnu.org>; Sat, 28 Aug 2021 15:19:29 -0700 (PDT) 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=wWIE6y6KUY6BVXV1a5EpKrqjKuTMf0oZpKC2ta6ShQo=; b=GJZUK2B992M2vrBlwH7Dkd2yV+KjWsaYSVYovczbWOsat1o6E/t7qOptpZhjl8OduK J7TiZixmKeSRv/z7VG1SIwltEOjDQQmTYFsWDyY0YOhFNawAPquo47MbO8y2d8GPNfGP MKCK7eqpmgKnFoOSvBDT4/IBCNM9cey+MipzOYfWj1BPGjgVy57tvVPlLIuJ4mCKYPrP aSjCDULKCxDEtYQen+o5M9wykhYMx+qz21pAcgO5KQTV0Xa0yPD8XUYbYMUHDEqcCs/i 43+LwY0isK9phw2x3Cy8214Y7ImTM4Z/sGoCxLzCef/YBF+6vfk7OTzsx0n5CyArrntM 6y0Q== 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=wWIE6y6KUY6BVXV1a5EpKrqjKuTMf0oZpKC2ta6ShQo=; b=IpdnCPX6mhhxscDqfGbruvDeaeUu3rlPJRXKxc4ZwyMFHf1GwcWFe00SJbXjPzGb8b 3XckxZi9GuoonsDEuJikTKKJ3l/Ltrr8P8NlqU+tPVW6U/bNVFRIklg6xEcGDUFapAoL E6ggRAHprPVcf9wxKz9OnW0LwMQSk5cnal0JC4WN6BENf752TSdFEg4dPWzgpmFwRwo9 8Bl3HigKhMqDPOp9eYUo23iux4ahCOwqBC+T7Es2oGFdGXl2Q0VF6YBfBWargrJEkpAz Mvs1tc3gK8G2/2jHkcaQ+pY+j+K1sWrfflkJp8CFKKP8qhT9rhHcBZ3XyTocAUez3C6T G8gA== X-Gm-Message-State: AOAM530W6xIO1ADyIooTFDoEcypOVgFkgCfzD0UPaAIBpp10gMdyY9tr RZeEEyRsBTL7CFANe7eAe2U= X-Google-Smtp-Source: ABdhPJwUo6LpmyyxyIT4N/QeB6oyYek4Yi2FlnUBB/N33QADmjiKuphVjMXAuIEVkljRqcCoZaK6qg== X-Received: by 2002:a5d:47a4:: with SMTP id 4mr17552211wrb.329.1630189164058; Sat, 28 Aug 2021 15:19:24 -0700 (PDT) Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id h11sm17801585wmc.23.2021.08.28.15.19.22 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 28 Aug 2021 15:19:23 -0700 (PDT) Subject: Re: bug#39452: [PATCH] vc-git-state fails for filenames with wildcards To: Lars Ingebrigtsen , Stephen Berman References: <83h802g77h.fsf@gnu.org> <8f427281-510c-30c3-995f-364e22d9c1e2@yandex.ru> <85y2texxso.fsf@gmail.com> <52f47a82-b93e-d9c2-ee94-752b289d4b96@yandex.ru> <85lfp7ygk3.fsf@gmail.com> <87pmxwgcps.fsf@gnus.org> <1cb67253-c43f-caac-ee83-1241edaaeeaa@yandex.ru> <87k0lildtq.fsf@gnus.org> <6e6060f9-0259-9b12-f925-a1a85c6757c4@yandex.ru> <877dgoutmz.fsf@gnus.org> <2602aeaf-0f02-e744-2b4f-012e73e012e8@yandex.ru> <87y28nbky4.fsf@linkov.net> <87o89ieruy.fsf@mail.linkov.net> <87a6l2d5kd.fsf@gmx.net> <87ilzpk3qi.fsf@gnus.org> <877dg5fuak.fsf@gmx.net> <87a6l1in9c.fsf@gnus.org> From: Dmitry Gutov Message-ID: Date: Sun, 29 Aug 2021 01:19:21 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <87a6l1in9c.fsf@gnus.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 0.4 (/) X-Debbugs-Envelope-To: 39452 Cc: Wolfgang.Scherer@gmx.de, Noam Postavsky , 39452@debbugs.gnu.org, Juri Linkov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.6 (/) On 28.08.2021 18:48, Lars Ingebrigtsen wrote: > Stephen Berman writes: > >> But I don't see at first glance why the unexpanded file name >> in the latter worked prior to the literal-pathspecs change but not >> afterwards. > > Isn't that what that change does -- make git interpret paths literally? > (So that you can have file names like "~" and "*" in your repo.) Yes and no: Git never received file names starting with "~" anyway - because vc-do-command converted all file names to relative ones. But a file name starting with ":(literal)..." is not something recognized by Emacs, so file-relative-name doesn't work anymore. If instead of altering file names we switch to the --literal-pathnames argument, this problem should go away. But we will return to the original concern that "the way git implements it, which is by setting an environment variable: it affects all subprocesses git calls, including git-hook scripts which tends to trip people up" (quoting Noam). From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 28 20:18:53 2021 Received: (at 39452) by debbugs.gnu.org; 29 Aug 2021 00:18:53 +0000 Received: from localhost ([127.0.0.1]:55164 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mK8XE-0005Mv-S8 for submit@debbugs.gnu.org; Sat, 28 Aug 2021 20:18:53 -0400 Received: from mail-wr1-f53.google.com ([209.85.221.53]:45643) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mK8X9-0005MY-BP for 39452@debbugs.gnu.org; Sat, 28 Aug 2021 20:18:51 -0400 Received: by mail-wr1-f53.google.com with SMTP id n5so16477813wro.12 for <39452@debbugs.gnu.org>; Sat, 28 Aug 2021 17:18:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:from:to:cc:references:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=sP7c4OyBVFVPpQiaPeEYQgpK2B3dA0abGa1AaQMs1as=; b=OLf0tJCeqDPuAfnlpvAUgcGhkK5C/cwidhG9LgsFJECEW2wA4FXttkgpsgL0SGqTWe 33AVCo/OfNQKUPQXELmf2yGddxG5P42P0wOrnRNo+PCZp0PLQl7/ivbWaJgGKXBLsJxm fuFE6t96xasfVuagwyc4EMFoDq0sUd2zY9YT+Ab5YR7vT99VWTX3tFU79WLNgb0oR0xd y0LKqhib4LFGE9EB0QngJt9lX0gSZ7JDfHYAad15S1LPWGA5CDzferBTZqhT28ZjStoi mxnKKSgeuOFC0y/VKkKZMeUNNIlDwaPryjNaEyquZyHHhW/llMh7CwnYkiE8fhHa2Eud GKyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:from:to:cc:references:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=sP7c4OyBVFVPpQiaPeEYQgpK2B3dA0abGa1AaQMs1as=; b=Pe55NvmvFyu6kRsBVXlktISCXfNL6mjQiyXgbZXixpuOTuQdwIZr/fgNWFHqGtd7gv OXmaFgbt+5Y97RrVGfe3cozTbsMH67FE69lMtf2966B7Ue3aD75tnj1da9M8pIwLHN2O FsCAGBgQ0aS8UZw81tr7U1p8BJgnkocbwu6FBCEyKyXLXTgBsk9nSZhnNgRG/D6C6Je5 sOaFkMOEjCwLeCkpCiTcTWqZ9OA06Z3hAjykOZk4iHhXQHHG4Ci1tXWPMkhZATo8s9OG jfAXtFHKKOr8mXJf/HHWW5G4XEGQSBRwoPQAhk+dQ0qo54SC0OgYgoZUx2AHvoQS/nKl rqgw== X-Gm-Message-State: AOAM533uiL5GXX49UXhmqq2G/wIfmaXl8K90J2zuoZq1A6fdbYXiKOwH BBeQB02hO8d/xDaazWuMO5g= X-Google-Smtp-Source: ABdhPJxhaNGcRyQCmiJzXc+xkLJ4r4JjE9yGyuaqud/B+7uZ/qY/CkMjjwB0Y5wT+B5ODbIra8SNEA== X-Received: by 2002:adf:ebc8:: with SMTP id v8mr17942380wrn.153.1630196321577; Sat, 28 Aug 2021 17:18:41 -0700 (PDT) Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id l1sm8814433wrb.15.2021.08.28.17.18.40 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 28 Aug 2021 17:18:41 -0700 (PDT) Subject: Re: bug#39452: [PATCH] vc-git-state fails for filenames with wildcards From: Dmitry Gutov To: Juri Linkov References: <83h802g77h.fsf@gnu.org> <8f427281-510c-30c3-995f-364e22d9c1e2@yandex.ru> <85y2texxso.fsf@gmail.com> <52f47a82-b93e-d9c2-ee94-752b289d4b96@yandex.ru> <85lfp7ygk3.fsf@gmail.com> <87pmxwgcps.fsf@gnus.org> <1cb67253-c43f-caac-ee83-1241edaaeeaa@yandex.ru> <87k0lildtq.fsf@gnus.org> <6e6060f9-0259-9b12-f925-a1a85c6757c4@yandex.ru> <877dgoutmz.fsf@gnus.org> <2602aeaf-0f02-e744-2b4f-012e73e012e8@yandex.ru> <87y28nbky4.fsf@linkov.net> Message-ID: <9fa4e453-9f8b-9c2b-b3d3-76bb656d6ad5@yandex.ru> Date: Sun, 29 Aug 2021 03:18:39 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 0.4 (/) X-Debbugs-Envelope-To: 39452 Cc: Lars Ingebrigtsen , Noam Postavsky , 39452@debbugs.gnu.org, Wolfgang.Scherer@gmx.de X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.6 (/) On 27.08.2021 15:51, Dmitry Gutov wrote: > Would be great to add some test, though. vc-tests.el currently doesn't > exercise vc-rename-file at all. Just added the tests for vc-rename-file. From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 29 12:55:06 2021 Received: (at 39452) by debbugs.gnu.org; 29 Aug 2021 16:55:07 +0000 Received: from localhost ([127.0.0.1]:57269 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mKO5K-0003P9-MX for submit@debbugs.gnu.org; Sun, 29 Aug 2021 12:55:06 -0400 Received: from relay8-d.mail.gandi.net ([217.70.183.201]:55991) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mKO5I-0003OX-Cs for 39452@debbugs.gnu.org; Sun, 29 Aug 2021 12:55:05 -0400 Received: (Authenticated sender: juri@linkov.net) by relay8-d.mail.gandi.net (Postfix) with ESMTPSA id 9B7301BF203; Sun, 29 Aug 2021 16:54:55 +0000 (UTC) From: Juri Linkov To: Dmitry Gutov Subject: Re: bug#39452: [PATCH] vc-git-state fails for filenames with wildcards Organization: LINKOV.NET References: <83h802g77h.fsf@gnu.org> <8f427281-510c-30c3-995f-364e22d9c1e2@yandex.ru> <85y2texxso.fsf@gmail.com> <52f47a82-b93e-d9c2-ee94-752b289d4b96@yandex.ru> <85lfp7ygk3.fsf@gmail.com> <87pmxwgcps.fsf@gnus.org> <1cb67253-c43f-caac-ee83-1241edaaeeaa@yandex.ru> <87k0lildtq.fsf@gnus.org> <6e6060f9-0259-9b12-f925-a1a85c6757c4@yandex.ru> <877dgoutmz.fsf@gnus.org> <2602aeaf-0f02-e744-2b4f-012e73e012e8@yandex.ru> <87y28nbky4.fsf@linkov.net> <9fa4e453-9f8b-9c2b-b3d3-76bb656d6ad5@yandex.ru> Date: Sun, 29 Aug 2021 19:44:50 +0300 In-Reply-To: <9fa4e453-9f8b-9c2b-b3d3-76bb656d6ad5@yandex.ru> (Dmitry Gutov's message of "Sun, 29 Aug 2021 03:18:39 +0300") Message-ID: <87h7f8dzm5.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 39452 Cc: Lars Ingebrigtsen , Noam Postavsky , 39452@debbugs.gnu.org, Wolfgang.Scherer@gmx.de X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >> Would be great to add some test, though. vc-tests.el currently doesn't >> exercise vc-rename-file at all. > > Just added the tests for vc-rename-file. Thanks, I tried to run the test, but it fails: Test vc-test-rcs05-rename-file condition: (ert-test-failed ((should (equal (vc-state new-name) 'added)) :form (equal up-to-date added) :value nil :explanation (different-atoms up-to-date added))) FAILED 12/12 vc-test-rcs05-rename-file Another question: after removing vc-git--literal-pathspecs from vc-git-rename-file, does this mean that vc-git-rename-file now doesn't support literal paths? Maybe it could be possible to fix vc-git--literal-pathspecs to support relative literal paths for vc-git-rename-file? From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 29 15:50:22 2021 Received: (at 39452) by debbugs.gnu.org; 29 Aug 2021 19:50:22 +0000 Received: from localhost ([127.0.0.1]:57448 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mKQov-0005jS-ON for submit@debbugs.gnu.org; Sun, 29 Aug 2021 15:50:22 -0400 Received: from mail-wr1-f54.google.com ([209.85.221.54]:33428) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mKQou-0005jD-0e for 39452@debbugs.gnu.org; Sun, 29 Aug 2021 15:50:20 -0400 Received: by mail-wr1-f54.google.com with SMTP id d26so19407604wrc.0 for <39452@debbugs.gnu.org>; Sun, 29 Aug 2021 12:50:19 -0700 (PDT) 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=kHF4ObSNAKgW3qWwMITVgJLx/Nl1MaWS4BhEIceUd7M=; b=n6Z6Jj92nl60AfNHXMW5bBxKk0b2sLiGXYO/zpVaauW3n8ej9/cLY0yUCaory60MUQ 3UqIqXjPM2RjC7TALzs7oD51tuhYbTxwXfnpCssPanrH/egBSPgZVrfjjPU45YDQQlSE MoYdBkf0+xw+xJteE3TWnHYrq/BiZBucJw3WqzdlTs/zgkE25h6WzSSoCJGDIPNu6sSf AXGmdcyfrx+YjM4UcKYoDLP9RNRT0tZpRIyxrx9+wmNvQ4aUcNDq3wKt2HMiEsBzWjoy VHhboNlrtalCx+RpU2RDyUfUjEuXkP4afWer5gdEm/X0LK8kfklvqs19EwcYiC27koWm B4vg== 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=kHF4ObSNAKgW3qWwMITVgJLx/Nl1MaWS4BhEIceUd7M=; b=pQOBzNikR/CYCxOIcSYHAaGen1WpuniFrUUx1HfY45wEkIHpCJZLf60feYcId4+O/W FdDNm0PcXLBxqHbqSSuDIqf6l1CkeY1WMBab+gVRRwpgKUk8WIHqoBsqAuw+BjsKICeA vCvfTkDrDveckj2uRdi4DhR4EFoDvUVM2TI8PIQatTevb4bjh+k2+fPDQu7NyZgSVBdV wqcb3RGw9ElJfxLIOgcfyl0tVd0wRWF3MGsswD4x0/BSzfpEeJkELLcCgoCVqacpEkHW 6juwuoUG9LavVpZv7jnZZ5CO0fmryB3GQUwrx3CWD84/SAEZOz3HH54y5eTt1wWqBNDP xfOw== X-Gm-Message-State: AOAM533eiXhAm8zQwYWMl0BfqFCXCljfnhaFC+jdTsjfc1XDrgcha50Z oExfbuaKkqRt5cf6kb9kkQk= X-Google-Smtp-Source: ABdhPJxyqbwO/zkzUJDNCtcHmxv098rJKyK8eYVX0EOwmAJUwVQ5+ar+D3048XP5ENCxm8h+TZ0UIw== X-Received: by 2002:a5d:404e:: with SMTP id w14mr22267346wrp.391.1630266613959; Sun, 29 Aug 2021 12:50:13 -0700 (PDT) Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id q14sm6790969wrc.31.2021.08.29.12.50.12 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 29 Aug 2021 12:50:13 -0700 (PDT) Subject: Re: bug#39452: [PATCH] vc-git-state fails for filenames with wildcards To: Juri Linkov References: <83h802g77h.fsf@gnu.org> <8f427281-510c-30c3-995f-364e22d9c1e2@yandex.ru> <85y2texxso.fsf@gmail.com> <52f47a82-b93e-d9c2-ee94-752b289d4b96@yandex.ru> <85lfp7ygk3.fsf@gmail.com> <87pmxwgcps.fsf@gnus.org> <1cb67253-c43f-caac-ee83-1241edaaeeaa@yandex.ru> <87k0lildtq.fsf@gnus.org> <6e6060f9-0259-9b12-f925-a1a85c6757c4@yandex.ru> <877dgoutmz.fsf@gnus.org> <2602aeaf-0f02-e744-2b4f-012e73e012e8@yandex.ru> <87y28nbky4.fsf@linkov.net> <9fa4e453-9f8b-9c2b-b3d3-76bb656d6ad5@yandex.ru> <87h7f8dzm5.fsf@mail.linkov.net> From: Dmitry Gutov Message-ID: <6c1eff82-28f1-606c-4d9f-addd904880c8@yandex.ru> Date: Sun, 29 Aug 2021 22:50:11 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <87h7f8dzm5.fsf@mail.linkov.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 0.4 (/) X-Debbugs-Envelope-To: 39452 Cc: Lars Ingebrigtsen , Noam Postavsky , 39452@debbugs.gnu.org, Wolfgang.Scherer@gmx.de X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.6 (/) On 29.08.2021 19:44, Juri Linkov wrote: >>> Would be great to add some test, though. vc-tests.el currently doesn't >>> exercise vc-rename-file at all. >> >> Just added the tests for vc-rename-file. > > Thanks, I tried to run the test, but it fails: > > Test vc-test-rcs05-rename-file condition: > (ert-test-failed > ((should > (equal > (vc-state new-name) > 'added)) > :form > (equal up-to-date added) > :value nil :explanation > (different-atoms up-to-date added))) > FAILED 12/12 vc-test-rcs05-rename-file Could you go ahead and fix the expectation? The check is near the end of vc-test--rename-file, and the expected value can be made to depend on the current backend. I could only run the tests with Git, Hg and Bzr, and I couldn't find any CI builds for Emacs that are still working. > Another question: after removing vc-git--literal-pathspecs from > vc-git-rename-file, does this mean that vc-git-rename-file > now doesn't support literal paths? Maybe it could be possible > to fix vc-git--literal-pathspecs to support relative literal paths > for vc-git-rename-file? The original problem just meant that 'git mv' never supported pathspecs (which makes sense), that's why it broke after the change. Now we pass file names to it (which it interprets literally), and all is well. From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 29 15:57:14 2021 Received: (at 39452) by debbugs.gnu.org; 29 Aug 2021 19:57:14 +0000 Received: from localhost ([127.0.0.1]:57458 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mKQva-0005uK-31 for submit@debbugs.gnu.org; Sun, 29 Aug 2021 15:57:14 -0400 Received: from quimby.gnus.org ([95.216.78.240]:55752) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mKQvX-0005u5-EE for 39452@debbugs.gnu.org; Sun, 29 Aug 2021 15:57:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=Hz0CydwjHDaOR68e5hNbMAQwqyy1hctUYkwjprB+Awk=; b=Bk6xe6ZYeBzZDcz2DbB8Mfs2d+ 850Eh2I89+n0sk/kX2HIO31VHsKE2R0UcGb07mQlgDsfazGrlw4nmAvv1xXQWLpoBliJzLVDLkCfm q6spTO2wy6Ft4X6bZlAaygNWIbcAnCjEfQNJaV3q+a4MlW+tqgIOqQaQps7Ebts1BWC8=; Received: from [84.212.220.105] (helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mKQvM-0003Fv-QO; Sun, 29 Aug 2021 21:57:04 +0200 From: Lars Ingebrigtsen To: Dmitry Gutov Subject: Re: bug#39452: [PATCH] vc-git-state fails for filenames with wildcards References: <83h802g77h.fsf@gnu.org> <8f427281-510c-30c3-995f-364e22d9c1e2@yandex.ru> <85y2texxso.fsf@gmail.com> <52f47a82-b93e-d9c2-ee94-752b289d4b96@yandex.ru> <85lfp7ygk3.fsf@gmail.com> <87pmxwgcps.fsf@gnus.org> <1cb67253-c43f-caac-ee83-1241edaaeeaa@yandex.ru> <87k0lildtq.fsf@gnus.org> <6e6060f9-0259-9b12-f925-a1a85c6757c4@yandex.ru> <877dgoutmz.fsf@gnus.org> <2602aeaf-0f02-e744-2b4f-012e73e012e8@yandex.ru> <87y28nbky4.fsf@linkov.net> <9fa4e453-9f8b-9c2b-b3d3-76bb656d6ad5@yandex.ru> <87h7f8dzm5.fsf@mail.linkov.net> <6c1eff82-28f1-606c-4d9f-addd904880c8@yandex.ru> Date: Sun, 29 Aug 2021 21:57:00 +0200 In-Reply-To: <6c1eff82-28f1-606c-4d9f-addd904880c8@yandex.ru> (Dmitry Gutov's message of "Sun, 29 Aug 2021 22:50:11 +0300") Message-ID: <87ilzodnxv.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.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 @@CONTACT_ADDRESS@@ for details. Content preview: Dmitry Gutov writes: > Could you go ahead and fix the expectation? > > The check is near the end of vc-test--rename-file, and the expected > value can be made to depend on the current backend. Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 39452 Cc: Wolfgang.Scherer@gmx.de, Noam Postavsky , 39452@debbugs.gnu.org, Juri Linkov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Dmitry Gutov writes: > Could you go ahead and fix the expectation? > > The check is near the end of vc-test--rename-file, and the expected > value can be made to depend on the current backend. OK, now done. (But RCS returns up-to-date her instead of added -- is that correct?) -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 29 16:11:48 2021 Received: (at 39452) by debbugs.gnu.org; 29 Aug 2021 20:11:48 +0000 Received: from localhost ([127.0.0.1]:57470 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mKR9f-0006Hm-Sq for submit@debbugs.gnu.org; Sun, 29 Aug 2021 16:11:48 -0400 Received: from mail-wm1-f54.google.com ([209.85.128.54]:39634) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mKR9e-0006HY-Eg for 39452@debbugs.gnu.org; Sun, 29 Aug 2021 16:11:47 -0400 Received: by mail-wm1-f54.google.com with SMTP id f9-20020a05600c1549b029025b0f5d8c6cso13213015wmg.4 for <39452@debbugs.gnu.org>; Sun, 29 Aug 2021 13:11:46 -0700 (PDT) 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=nkq+pEXbNs4fWNiYAx+AA/tYWmwxNpfPGqG7ml9P2j8=; b=oXZ5GYhZeQGUkIGoikUGP6yawnaDGaDZQR97cE5KRFDbJpjSmqyQexqqv/1wzI688G spLcA6AI2IqMBwcJ5kZX7o1llFJuUCydldfJtXBa7oy6ohL+yIn3vq/NQCkWkEYluVi/ bMbEXSCMOJlI8l+EPA/idDTW+Ec9M9iceysro2Z/YM7lDq7cWjRG21MMxZMsT/sPbSV/ O1FtqmsPZtEHkGdLJTqHU9nNejLMKh9zwXOLFUQfanNldA+VdmyXoLtbFXMnxHhoaXlY OY4h0v/buHAyUKu8gc7nZsn+/3jPMj4Tg8s660uAAVLE3meDuciu3FAks+y00/RB5cnS 1jHw== 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=nkq+pEXbNs4fWNiYAx+AA/tYWmwxNpfPGqG7ml9P2j8=; b=maVNh1/Iad0gegQwyrccxxtXzjamZjztp35ei2HJ2qkfFBim1sVeylQlgNqA6tzpt2 N2UdKWzsjMiglZyGXsQhgAB0PiLhlwuLW2C2jvIb+DDyeuClfY0m0iZNdvpiI0vImZxN XV7ejvfp4cYnIJiv+vo4MC/3KnLsv2hau8ARZbrTFtSpe+upmILL6YVv4gMEyCuyjEGv WnldUF0bzUX7FZMuHuqethEc1MPvfbNolIrs4fQuqs6qQroABcTe9g3pD1QPfi2P3Ylb teq4Y6cIe/vR4loudzxrjgWO6Kwy4wIzkDMr/MMzHgqH7ozHthxFJ/EscftsBpVVCg8J mdig== X-Gm-Message-State: AOAM530n2GHoQjDq43C/EYBsP4hg3+rQA2b/hG91Nbi2+9z2gvXHt5K2 0SHw04tpDuR1wyQ9dJ4vtmM= X-Google-Smtp-Source: ABdhPJykJXsEmWdiEO3V3cbPkPqleB7Z/+r3IkPwIuLGsh6xmyF5GcFa5mGZKt46YxW4MnnX82myFg== X-Received: by 2002:a1c:ed0a:: with SMTP id l10mr12941696wmh.140.1630267900603; Sun, 29 Aug 2021 13:11:40 -0700 (PDT) Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id c2sm13356993wrs.60.2021.08.29.13.11.39 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 29 Aug 2021 13:11:40 -0700 (PDT) Subject: Re: bug#39452: [PATCH] vc-git-state fails for filenames with wildcards To: Lars Ingebrigtsen References: <83h802g77h.fsf@gnu.org> <8f427281-510c-30c3-995f-364e22d9c1e2@yandex.ru> <85y2texxso.fsf@gmail.com> <52f47a82-b93e-d9c2-ee94-752b289d4b96@yandex.ru> <85lfp7ygk3.fsf@gmail.com> <87pmxwgcps.fsf@gnus.org> <1cb67253-c43f-caac-ee83-1241edaaeeaa@yandex.ru> <87k0lildtq.fsf@gnus.org> <6e6060f9-0259-9b12-f925-a1a85c6757c4@yandex.ru> <877dgoutmz.fsf@gnus.org> <2602aeaf-0f02-e744-2b4f-012e73e012e8@yandex.ru> <87y28nbky4.fsf@linkov.net> <9fa4e453-9f8b-9c2b-b3d3-76bb656d6ad5@yandex.ru> <87h7f8dzm5.fsf@mail.linkov.net> <6c1eff82-28f1-606c-4d9f-addd904880c8@yandex.ru> <87ilzodnxv.fsf@gnus.org> From: Dmitry Gutov Message-ID: <99f71c06-6dd5-bc3c-1e19-c602713e538a@yandex.ru> Date: Sun, 29 Aug 2021 23:11:38 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <87ilzodnxv.fsf@gnus.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 0.4 (/) X-Debbugs-Envelope-To: 39452 Cc: Wolfgang.Scherer@gmx.de, Noam Postavsky , 39452@debbugs.gnu.org, Juri Linkov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.6 (/) On 29.08.2021 22:57, Lars Ingebrigtsen wrote: > Dmitry Gutov writes: > >> Could you go ahead and fix the expectation? >> >> The check is near the end of vc-test--rename-file, and the expected >> value can be made to depend on the current backend. > OK, now done. (But RCS returns up-to-date her instead of added -- is > that correct?) I guess so. I'm not familiar with RCS, but 'added' does not occur even once in vc-rsc.el, so apparently it doesn't have a separate state like that. From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 29 22:36:15 2021 Received: (at 39452) by debbugs.gnu.org; 30 Aug 2021 02:36:16 +0000 Received: from localhost ([127.0.0.1]:57873 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mKX9j-0007dd-LW for submit@debbugs.gnu.org; Sun, 29 Aug 2021 22:36:15 -0400 Received: from mail-wm1-f54.google.com ([209.85.128.54]:46057) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mKX9i-0007dQ-LK for 39452@debbugs.gnu.org; Sun, 29 Aug 2021 22:36:15 -0400 Received: by mail-wm1-f54.google.com with SMTP id j17-20020a05600c1c1100b002e754875260so8375600wms.4 for <39452@debbugs.gnu.org>; Sun, 29 Aug 2021 19:36:14 -0700 (PDT) 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; bh=BewLBXF3mT/2noCxRawTNoPzZ7idPk8GihLt9sTiETE=; b=ixIPGfxBDbR7V8DSQP0xMCSXK1/o8iEWhzYJggFe/BMJ8S8rOLMjrlyzaEckgu/KQg 1xn4EqG/iNL5CFGgx8c3Qi+jS6djI1Zmbf06O0ar0FrlZ+rDcpLVkTg1Bn1S/m5Igcpl L/Jwhvqm212a9/htdfs7dTirMZvUSaz6wUF3yFh3foZ6ZN3xemglO2u9diCV2mZej2UF 0peJfhC4OpQ0gPgdYcZjrPPnjW67B53T2Y61d8vFToHCZkfT5zrjTaJ+vESUq38iyDf+ EeFc451YmzkggjRYfc7mtDhKvVzOzgBfqRbDTwLmw8YR+6SSSeistHDjyFTxs40Gqbtz TX7Q== 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; bh=BewLBXF3mT/2noCxRawTNoPzZ7idPk8GihLt9sTiETE=; b=VVh9kqqe5H42tUv1VB028dTpJNzDkfU9a7mTSIPmWfesBZtTqqPOE3tIql4UW7zonc 0gi2eHpcMUpAHLaQdQYwDZvOFd0mcoP7yEnZ5gY0rDSLl0I2ZnABs5nsoNzHwArmIUlE teM0bfuhKEbSLchEpmlvs7vJDF08021pu9cGws5QuZxJNGYIFa9zkwxDkN20OV5R2p84 O9eEqXTiuIfO0A3639nNjxzGZyKEuw+MpdM28oJK/VoTAxPd1/o2bTK0b8XgQhfNFhxi dQwRNirK7BBrX+RXSMJAEP8ecIxxd9GoOPF0LlXNu7CUpYUO9QEtRYYUm59tHTT/v/bn /ssQ== X-Gm-Message-State: AOAM533/gnmJzgZV0RYwWMZN4YX26xEvUB4Kij2nsVFt8MuMVzGq+ly6 gBWl5hTnsLrsg39pdI/D+OA= X-Google-Smtp-Source: ABdhPJyO8OG6EIa/PpwScdwthvsgBfhyLnM/WxmSCyioY3MizKidmey+G9dC+IMzv4yEdtQnHFcF/g== X-Received: by 2002:a1c:1b53:: with SMTP id b80mr20256907wmb.133.1630290968838; Sun, 29 Aug 2021 19:36:08 -0700 (PDT) Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id y6sm16537401wrm.54.2021.08.29.19.36.07 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 29 Aug 2021 19:36:08 -0700 (PDT) Subject: Re: bug#39452: [PATCH] vc-git-state fails for filenames with wildcards To: Stephen Berman , Juri Linkov References: <83h802g77h.fsf@gnu.org> <8f427281-510c-30c3-995f-364e22d9c1e2@yandex.ru> <85y2texxso.fsf@gmail.com> <52f47a82-b93e-d9c2-ee94-752b289d4b96@yandex.ru> <85lfp7ygk3.fsf@gmail.com> <87pmxwgcps.fsf@gnus.org> <1cb67253-c43f-caac-ee83-1241edaaeeaa@yandex.ru> <87k0lildtq.fsf@gnus.org> <6e6060f9-0259-9b12-f925-a1a85c6757c4@yandex.ru> <877dgoutmz.fsf@gnus.org> <2602aeaf-0f02-e744-2b4f-012e73e012e8@yandex.ru> <87y28nbky4.fsf@linkov.net> <87o89ieruy.fsf@mail.linkov.net> <87a6l2d5kd.fsf@gmx.net> From: Dmitry Gutov Message-ID: <505a6483-2225-2aef-cec4-f99704384863@yandex.ru> Date: Mon, 30 Aug 2021 05:36:06 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <87a6l2d5kd.fsf@gmx.net> Content-Type: multipart/mixed; boundary="------------05127C9F4482B49A5B86F13A" Content-Language: en-US X-Spam-Score: 0.4 (/) X-Debbugs-Envelope-To: 39452 Cc: Lars Ingebrigtsen , Noam Postavsky , 39452@debbugs.gnu.org, Wolfgang.Scherer@gmx.de X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.6 (/) This is a multi-part message in MIME format. --------------05127C9F4482B49A5B86F13A Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit On 27.08.2021 22:57, Stephen Berman wrote: > I just discovered that some code I have that uses vc-print-log-internal > broke after the literal-pathspecs change; specifically, my code passes a > directory name beginning with "~/" to vc-print-log-internal, and this > had worked fine till that change, which broke it, and I found I have to > wrap the directory name in expand-file-name to make the code work again. > Is this expected fallout from that change or was I perhaps misusing > vc-print-log-internal and was just lucky that it had worked before? Here's a patch which restores vc-print-log-internal's behavior without major changes. Check it out (attached). --------------05127C9F4482B49A5B86F13A Content-Type: text/x-patch; charset=UTF-8; name="vc-print-log-internal-restore.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="vc-print-log-internal-restore.diff" diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el index 1cd200cd13..a5431abb40 100644 --- a/lisp/vc/vc-git.el +++ b/lisp/vc/vc-git.el @@ -245,7 +245,11 @@ vc-git-update-on-retrieve-tag (defun vc-git--literal-pathspec (file) "Prepend :(literal) path magic to FILE." ;; Good example of file name that needs this: "test[56].xx". - (and file (concat ":(literal)" (file-local-name file)))) + (let ((lname (file-local-name file))) + ;; Expand abbreviated file names. + (when (file-name-absolute-p lname) + (setq lname (expand-file-name lname))) + (and file (concat ":(literal)" lname)))) (defun vc-git--literal-pathspecs (files) "Prepend :(literal) path magic to FILES." diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index b75862e8a5..f0f5809d99 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el @@ -2055,9 +2055,9 @@ vc-root-diff ;; here, this way the *vc-diff* buffer is setup correctly, so ;; relative file names work. (let ((default-directory rootdir)) - (vc-diff-internal - t (list backend (list (expand-file-name rootdir)) working-revision) nil nil - (called-interactively-p 'interactive)))))) + (vc-diff-internal + t (list backend (list rootdir) working-revision) nil nil + (called-interactively-p 'interactive)))))) ;;;###autoload (defun vc-root-dir () @@ -2603,8 +2603,8 @@ vc-print-root-log (setq backend (vc-responsible-backend rootdir)) (unless backend (error "Directory is not version controlled"))) - (setq default-directory (expand-file-name rootdir)) - (vc-print-log-internal backend (list default-directory) revision revision limit + (setq default-directory rootdir) + (vc-print-log-internal backend (list rootdir) revision revision limit (when with-diff 'with-diff)))) ;;;###autoload --------------05127C9F4482B49A5B86F13A-- From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 30 09:34:16 2021 Received: (at 39452) by debbugs.gnu.org; 30 Aug 2021 13:34:16 +0000 Received: from localhost ([127.0.0.1]:58484 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mKhQV-0003zF-VB for submit@debbugs.gnu.org; Mon, 30 Aug 2021 09:34:16 -0400 Received: from mout.gmx.net ([212.227.17.20]:50631) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mKhQT-0003yt-Ah for 39452@debbugs.gnu.org; Mon, 30 Aug 2021 09:34:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1630330445; bh=M+b0iDTzsggoYEzXt0Jl6ABXIXOnhbqoI2xoZKYV4cI=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=Bu50bFw97dAAp6pM8viIUCAG2ADVUS1mdz29VYGUHU5oR/YMj1iIo3B8mcHUg6llO oThTYTHLRQb34PEYlaQBhFXV+zC7BN9eeavbBVXW5yxoTggc7mOQKqd3lkXlcMVpFA ZQB+AR28sUn1cA3nvR5UJ+f9MPM/wNBs9RRetqgw= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from strobelfs ([92.73.76.77]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MeCpb-1mtToI2BYl-00bHfZ; Mon, 30 Aug 2021 15:34:05 +0200 From: Stephen Berman To: Dmitry Gutov Subject: Re: bug#39452: [PATCH] vc-git-state fails for filenames with wildcards References: <83h802g77h.fsf@gnu.org> <8f427281-510c-30c3-995f-364e22d9c1e2@yandex.ru> <85y2texxso.fsf@gmail.com> <52f47a82-b93e-d9c2-ee94-752b289d4b96@yandex.ru> <85lfp7ygk3.fsf@gmail.com> <87pmxwgcps.fsf@gnus.org> <1cb67253-c43f-caac-ee83-1241edaaeeaa@yandex.ru> <87k0lildtq.fsf@gnus.org> <6e6060f9-0259-9b12-f925-a1a85c6757c4@yandex.ru> <877dgoutmz.fsf@gnus.org> <2602aeaf-0f02-e744-2b4f-012e73e012e8@yandex.ru> <87y28nbky4.fsf@linkov.net> <87o89ieruy.fsf@mail.linkov.net> <87a6l2d5kd.fsf@gmx.net> <505a6483-2225-2aef-cec4-f99704384863@yandex.ru> Date: Mon, 30 Aug 2021 15:34:04 +0200 In-Reply-To: <505a6483-2225-2aef-cec4-f99704384863@yandex.ru> (Dmitry Gutov's message of "Mon, 30 Aug 2021 05:36:06 +0300") Message-ID: <87fsurcb03.fsf@gmx.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:QHnKIxVkxyqsBwJVMbH0WXJZPwh49RcX9rSTfqdympcVY8D+Wfp wj9rZYo/qifkTRyaLliFnAtLERU3JXzo3oGI0ShD8HJ9assKsEJb5yMZ4APalFL3V2tOj7H 2Jgwqo0T3+BX19724Anin8L2JPKliiQKwDrmR7eEoJRqKwNg+8eFTc4IZrLRX8iy2a3r8qf ogtUPXbDcuYOSq0gIHGJA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:o5p5GDQGJWM=:U4XFYT1Ybt/1nW9fe6fQ17 w2sWKDQOgdg4CTn2RrlXAYqC3grcj8ZMchbBk6oCl84NdcGzqpv+M8MN4MemaNvdyUIyrkQmk Kj6T2jy7iFf8j3pX/ByuIgwqJ8VRvzobqI7jcptCZQyeQInQotFgzTRldx/8vUT+2/1GizH2U 8uKtVuSPubFQKZf3wWuJLLk51oC9VLvR+PTbctKsFMPV14eODXNKp4WzScnjpDm7I9L6pPS+6 JKqVoGEAdyI9oDpSHXc6Zklm7crT1AMi7S/vcLr+JAX8dJQQpbEknJ6hAioBN+Ge0VS5q7s2r dsfCd9ucTEQF6m8yLOYtQNDIOCDK1I55vej5iP36DEJgMioDpj3F8FZzfCisSZ2AXBWAOHpqS 66b5N6B3pyunBRT0y6zifwc8uZL8NTVa1H+/7/Aikqa54BjJALfNPupsDkTHE/Hhe9xP7Yi89 WorHj8/cdmUOHQO+xj6WumRZK0OEKHwfiEPeQCs4nC/IoldMnA9VYn/ysdScPLW2jXrxd5zPY QQ+Tfcm/mWSG03lrYpkUCt0VbrgDkOYLZy3YFBlFJ9yZ/QfUahBNV+fCu2em31230HEUNropb oZ4XgblssQBRcaa15OicMs94nEEsMU+/MXCn1g6ITjXd1dvHswjdhiksHMXlCxsYe8EtjpUhQ 0NTiHZhtOnFCVp3OjJP57qToZQvwKS6ODIj5v7bcA37u6qF5xXA2fMAUHaMmwuVPUrhu+J8LA AHgYtPG3xofrMxlVFsZx+TzoOlZ4rMjGj/0yJ/pEPT5SLCCu1WdfIDR2lLbpW7vqNkrmr1Sx+ aSpQhoe8HlzAZOBUc3C7JTM2fn+nY6z060lIL/nvhpGgtqoVdKWpWJ1ooOgQR0avsuK/r9l83 fEqRCKDkNhRs6L477W/GLLoTtrHrBOhpKbOjUhzE66EI1sHEhjHuQ/HxM4eqEKkCdsorBj39O 5xdTJwcf/ahQmdiCx3q7mQFiXTChFcueEnM0VxKivWmy0I4hsE7vlI7yByMWJTA3oC/gGXGMj jRQf8O3ig/92nAThx7EdM+MJTQz5vXW1ceZ5fgKo8isRcGyCPyHvvav3u20nvtbkMvoKrj6e4 YLf0bNSrSbpj/ruzXgY6X0esEDLtOdkGVdUtMkGbyRQGt8YdDy0CVk/eA== X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 39452 Cc: Lars Ingebrigtsen , Wolfgang.Scherer@gmx.de, Noam Postavsky , 39452@debbugs.gnu.org, Juri Linkov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On Mon, 30 Aug 2021 05:36:06 +0300 Dmitry Gutov wrote: > On 27.08.2021 22:57, Stephen Berman wrote: >> I just discovered that some code I have that uses vc-print-log-internal >> broke after the literal-pathspecs change; specifically, my code passes a >> directory name beginning with "~/" to vc-print-log-internal, and this >> had worked fine till that change, which broke it, and I found I have to >> wrap the directory name in expand-file-name to make the code work again. >> Is this expected fallout from that change or was I perhaps misusing >> vc-print-log-internal and was just lucky that it had worked before? > > Here's a patch which restores vc-print-log-internal's behavior without major > changes. Check it out (attached). Yeah, with that patch my code works again when passing a directory name beginning "~/" to vc-print-log-internal. Thanks. Steve Berman From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 30 19:48:44 2021 Received: (at 39452) by debbugs.gnu.org; 30 Aug 2021 23:48:44 +0000 Received: from localhost ([127.0.0.1]:60610 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mKr1A-0005vN-Fl for submit@debbugs.gnu.org; Mon, 30 Aug 2021 19:48:44 -0400 Received: from mail-wr1-f41.google.com ([209.85.221.41]:39605) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mKr16-0005v5-Ad for 39452@debbugs.gnu.org; Mon, 30 Aug 2021 19:48:43 -0400 Received: by mail-wr1-f41.google.com with SMTP id z4so24721766wrr.6 for <39452@debbugs.gnu.org>; Mon, 30 Aug 2021 16:48:40 -0700 (PDT) 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=4PdCa7my2aSzMTaK2Z8K1idLSl35N6Q7hc0XHqniRO8=; b=so4ArK2bm5k3uaBtAq20EzKo5J8MicvfAjDf1/rc9p3xId+eDihhCqZ2Ng3xIwIrNA GdiZmmnj004CrYMXZ2dZdh9khooaZagJXn67q/sn9GMfiBReJFKq4/IXEOZmQ7Yh3hG+ g3JtwdEG4OsjnCQ2IXdt8LhBwj/cQ6Yad9sh1IMsxMbHYfYKNgqevCpTW5syhJPlMtni tixDb+OACpo9kT4HynuqG1l/0KY4MgHrNXtcwLjEOFvsqwUHtPl6qQvDwxJwXZqzmgBl H51nh3ms/ROH3+L51/olALkKwqqQgOVed7s0aQOAD8v4C4i2/2riM7NatBpf+2WYqech lWLA== 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=4PdCa7my2aSzMTaK2Z8K1idLSl35N6Q7hc0XHqniRO8=; b=ku39nVqTkP2C14NokChXtk61MLGtF1XHobfeqoJwPqzqYb1XvEpP+gYujVi1tVFdhb LH2Njo+31+LNoh+wLfCMl1AQ0NUoT6MQlBoYZCwjIurLtBY+GM2fjznm/JSczaFusu8a dHQu0Fhg0OwhkBDKLwIvjl49cr0gBUy8BaoaIWm7wlSXjxR21Do22/Fp6ypT7WtC08nJ +enj2Sn2r1XttK245F2XHB+kjQZelwRTDb/r8t9c3KDfhisRa9Mb1VVcx4Bu/qmRxgZb QzZLHOZMbxuXwHkGcXk7vtKJF2yPJzL/KRmnG6Aegnyv8d3pyzc6M+lezrHdXWs2WfNk pH6g== X-Gm-Message-State: AOAM530CFzsDVi/23U4qo9WglfiKoNvrk/XFsEKyAuCXUmtdwufEwro7 Dz56wS0RwGBXvm+cy5U4ZEA= X-Google-Smtp-Source: ABdhPJyNWKd7cQ0QjfFNfFkN7R1/XC6oH32pc7oOlgjXdeO6c+tBljpgGB9eyqrcg6cyqSlu5Ss5Bg== X-Received: by 2002:adf:9e08:: with SMTP id u8mr11059729wre.383.1630367314442; Mon, 30 Aug 2021 16:48:34 -0700 (PDT) Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id g138sm887536wmg.34.2021.08.30.16.48.32 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 30 Aug 2021 16:48:33 -0700 (PDT) Subject: Re: bug#39452: [PATCH] vc-git-state fails for filenames with wildcards To: Stephen Berman References: <83h802g77h.fsf@gnu.org> <8f427281-510c-30c3-995f-364e22d9c1e2@yandex.ru> <85y2texxso.fsf@gmail.com> <52f47a82-b93e-d9c2-ee94-752b289d4b96@yandex.ru> <85lfp7ygk3.fsf@gmail.com> <87pmxwgcps.fsf@gnus.org> <1cb67253-c43f-caac-ee83-1241edaaeeaa@yandex.ru> <87k0lildtq.fsf@gnus.org> <6e6060f9-0259-9b12-f925-a1a85c6757c4@yandex.ru> <877dgoutmz.fsf@gnus.org> <2602aeaf-0f02-e744-2b4f-012e73e012e8@yandex.ru> <87y28nbky4.fsf@linkov.net> <87o89ieruy.fsf@mail.linkov.net> <87a6l2d5kd.fsf@gmx.net> <505a6483-2225-2aef-cec4-f99704384863@yandex.ru> <87fsurcb03.fsf@gmx.net> From: Dmitry Gutov Message-ID: <97432157-24a3-545f-10f9-b716e525f1b0@yandex.ru> Date: Tue, 31 Aug 2021 02:48:31 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <87fsurcb03.fsf@gmx.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 0.4 (/) X-Debbugs-Envelope-To: 39452 Cc: Lars Ingebrigtsen , Wolfgang.Scherer@gmx.de, Noam Postavsky , 39452@debbugs.gnu.org, Juri Linkov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.6 (/) On 30.08.2021 16:34, Stephen Berman wrote: > Yeah, with that patch my code works again when passing a directory name > beginning "~/" to vc-print-log-internal. Thanks. Thanks for testing. Pushed. From debbugs-submit-bounces@debbugs.gnu.org Tue Sep 07 19:34:18 2021 Received: (at 39452) by debbugs.gnu.org; 7 Sep 2021 23:34:19 +0000 Received: from localhost ([127.0.0.1]:58032 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mNkba-0007pS-MX for submit@debbugs.gnu.org; Tue, 07 Sep 2021 19:34:18 -0400 Received: from mail-wr1-f53.google.com ([209.85.221.53]:37484) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mNkbZ-0007pB-57; Tue, 07 Sep 2021 19:34:17 -0400 Received: by mail-wr1-f53.google.com with SMTP id v10so440991wrd.4; Tue, 07 Sep 2021 16:34:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=5nEbtODg45oATjSzrxpCoAiQ8CcmdT10N4sq4EjlBFc=; b=JjkbiWOg9v+3OhjxwBf0Ydgh/UGVVzDbhdV4IChMei0ydjXhO3DENohiykNuH3Ve5C q406eS7a0j06PZHvi4LVKdfLWYg5LCNQZSxpvZQhd1mXVjnzhMjDG9Z1p7iHfnPPyYOm HEHkwC7dy2qpuQELAik9cPxYCYcaKUz4aavzkJJVWoSrfTWn3T1vpgU15cGNKQ+iozwi 7LGTHsYmnIgIvx5wLBPVr0zFe6ivvSN6eGUKGvGCQ0hU/BeMeNx3nFrbPMfMcHdI7ZPW mCPwHm3FgY3dskraOYmmPEi2o9R3J3uP3A4KhEp4SxOT2e4ywUFfmVCS/veinyza5Nuw aFfg== 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=5nEbtODg45oATjSzrxpCoAiQ8CcmdT10N4sq4EjlBFc=; b=eNFtkrBTJGsl5kVZSqa1+AqJEjrli0SM1+dHXWyDfa2J7m9AN/a7znHhwKamddhxi5 D5TOCu8F1CljlFqXN5FDYy3JBg0lT9ISn83FTCOR75+Wd70WhvQvCyM/GA/XgSAjycaZ vFK9D+nxNFIdbEO/bC22Z/pp/oE70FQRq9suN5Dw6t0Cp8xNXjr7/SGe2VBU998AOxhj aPrrsyhRSTSyt4Qtq1MR2J54DgnX97WpUkHVtIh3dHk0Vhbo2njs3oAiXzr3+6HY2E6i gtyJEHvOtdTflyoUQANK5Lnu7592zY5YBFn8x7QQUAAVVVAMIw7s2tbw29HBU9KbxU7j QuPQ== X-Gm-Message-State: AOAM531iOphILz1jgbHGyocLXbP0275AiEorKapflwUV70xj2u0AID51 NGM9Vj8yr7GPSqUaUEhOn3K4yvQSnII= X-Google-Smtp-Source: ABdhPJwmqyarI0kTPdjOFfy/ymps0Ls4iJU3QxcA2H5UGa5aPJA8BRWEeR9nmIg/irBvpREHi+b5wQ== X-Received: by 2002:adf:c44b:: with SMTP id a11mr773641wrg.416.1631057651248; Tue, 07 Sep 2021 16:34:11 -0700 (PDT) Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id g1sm517311wmk.2.2021.09.07.16.34.10 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 07 Sep 2021 16:34:10 -0700 (PDT) Subject: Re: bug#50422: 28.0.50; vc-git-checkout: accept nil as first argument To: Tino Calancha , 50422-done@debbugs.gnu.org References: <875yve89gs.fsf@gmail.com> From: Dmitry Gutov Message-ID: <14b9e574-d4e0-b5a9-aa1c-10985f2c149a@yandex.ru> Date: Wed, 8 Sep 2021 02:34:09 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: <875yve89gs.fsf@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 0.4 (/) X-Debbugs-Envelope-To: 39452 Cc: 39452@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.6 (/) Hi Tino, On 06.09.2021 10:11, Tino Calancha wrote: > X-Debbugs-Cc:39452@debbugs.gnu.org > > Before the fix from bug#39452, the following was a valid call: > > (vc-git-checkout nil "master") > > Note that `vc-git-command' handles a nil 3rd argument. > (I rely in such a behavior). > > Since we call now `vc-git--literal-pathspec' in several commands, then > we could add a check at the beginning of this function: Yes, I broke this with the most recent fix in that area. Sorry. Should be fixed now with commit ff2c4a8353. From unknown Fri Aug 15 21:23:46 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 06 Oct 2021 11:24:09 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator