From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#50175: 28.0.50; tramp is hooked into C-x d (vc-dir) but not C-x = (vc-doff) Date: Thu, 26 Aug 2021 04:51:56 +0300 Message-ID: <9109d282-192c-22ec-6010-4e1f3cc97d9e@yandex.ru> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17013"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 Cc: larsi@gnus.org, 50175-done@debbugs.gnu.org To: sds@gnu.org, Ola x Nilsson Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Aug 26 03:53:11 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mJ4Zq-0004CX-Vj for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 26 Aug 2021 03:53:11 +0200 Original-Received: from localhost ([::1]:55756 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mJ4Zp-00085b-I0 for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 25 Aug 2021 21:53:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43952) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mJ4Zi-00084w-OQ for bug-gnu-emacs@gnu.org; Wed, 25 Aug 2021 21:53:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:36480) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mJ4Zi-00019M-Gk for bug-gnu-emacs@gnu.org; Wed, 25 Aug 2021 21:53:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mJ4Zi-0001Lw-4u for bug-gnu-emacs@gnu.org; Wed, 25 Aug 2021 21:53:02 -0400 Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Thu, 26 Aug 2021 01:53:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 50175 X-GNU-PR-Package: emacs Mail-Followup-To: 50175@debbugs.gnu.org, dgutov@yandex.ru, sds@gnu.org Original-Received: via spool by 50175-done@debbugs.gnu.org id=D50175.16299427355141 (code D ref 50175); Thu, 26 Aug 2021 01:53:01 +0000 Original-Received: (at 50175-done) by debbugs.gnu.org; 26 Aug 2021 01:52:15 +0000 Original-Received: from localhost ([127.0.0.1]:48026 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mJ4Yt-0001Km-8v for submit@debbugs.gnu.org; Wed, 25 Aug 2021 21:52:15 -0400 Original-Received: from mail-wr1-f52.google.com ([209.85.221.52]:36474) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mJ4Ym-0001KB-PW for 50175-done@debbugs.gnu.org; Wed, 25 Aug 2021 21:52:09 -0400 Original-Received: by mail-wr1-f52.google.com with SMTP id q14so2380359wrp.3 for <50175-done@debbugs.gnu.org>; Wed, 25 Aug 2021 18:52: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=8epHh6rxCHc0WJMxpzhR6I770DJMFwCD2M3xKZ6Zi3M=; b=g2PTZvE2NOkLVYo2Qe2n5rvX4bbR152c9LHJSwnFUNbKuScKuIomm1eEykV9vIm/9k rfXiFrSh5wuChqqN9ZUSczpKPZhCrxc+QkcxklRZpASy5c/LNvK2PFXqyOqaSVddWd6h 8gPxrfrHjpUaWj//B28S7YACywnqOF21YYLpEckFhzwShgjDOZdVmozYjkinXP2Q+tuH 6iIX8EjNvBftw4rkmKpPYdsE+ZQCfo0vwgTPjtikjX3RYQHygRaScq5yBIiGjQC8HXuA +Tyz/9B3cC6b5HQmYujD8HDhUNqWgu6OBLE9VdZexDtY4izALbvrJHhuw4GlzcA529nx fRtA== 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=8epHh6rxCHc0WJMxpzhR6I770DJMFwCD2M3xKZ6Zi3M=; b=Obq50T8R7F3MLIRkiwXgl2eoXOBsSlkYX5M5U6CaJQ1W6DlAxwJ1hhg+G4avdiG+48 jfsNOHHxokWc5ehi98rt4IOWEuz+/2Tv6Q2VSLxeEwMxQyvEusu+5VFg6hsEWr4kLMDK 0cdkQTD2qdVwyzyGV/5C2HqupySbYLm1Mw9y6mYVU+RAsFiEHM+g/Xq8ogzc52XZJ1AY YySN7AtyM0TuHjGCNCx26m+2v8b897CRkfJwmItPqMm7kjmUhOi21E1atZXVsnnlvBjU c7dNGi/WHAT7hFPKiP+lQu1YoiYy7HRH8iO13yh+qWDYlYQAQVW1Is//J4xJZNcoT5Uv fJ0w== X-Gm-Message-State: AOAM533vhcKhUaNpaLE1lqiFXlDl1RkQbVQVHdI4MNDqPV40JkSQLxee vm1znYELCtKg9V3MUOONO5w= X-Google-Smtp-Source: ABdhPJzBJ3Cwm9+2qVlgg1XKfcMiYTd2lXgGQ6M8uZFBNuwjqBhYaUpVMCpNc8PMkwrebZ1K9JARng== X-Received: by 2002:adf:f645:: with SMTP id x5mr950327wrp.353.1629942718769; Wed, 25 Aug 2021 18:51:58 -0700 (PDT) Original-Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id n8sm1525858wra.24.2021.08.25.18.51.57 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 25 Aug 2021 18:51:57 -0700 (PDT) In-Reply-To: Content-Language: en-US X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:212680 Archived-At: Hi! On 25.08.2021 18:45, Steingold wrote: > Hi Ola, Lars, Dmitry, > >> * Ola x Nilsson [2021-08-25 15:26:34 +0200]: >> >> On Mon, Aug 23 2021, Steingold wrote: >> >>> when editing a remote file, vc-dir shows the*vc-dir* buffer correctly, >>> but vc-diff in the same buffer fails: >>> >>> Debugger entered--Lisp error: (error "Failed (status 128): git --no-pager diff-index --exit-code >>> -p HEAD -- :(literal)/scp:remote:/path/file.py") >>> signal(error ("Failed (status 128): git --no-pager diff-index --exit-code -p HEAD -- >>> :(literal)/scp:remote:/path/file.py")) >>> error("Failed (%s): %s" "status 128" "git --no-pager diff-index --exit-code -p HEAD -- >>> :(literal)/scp:remote:/path/file.py") >>> vc-do-command("*vc-diff*" 1 "git" (":(literal)/scp:remote:/path/file.py") "--no-pager" >>> "diff-index" "--exit-code" "-p" "HEAD" nil "--") >>> apply(vc-do-command "*vc-diff*" 1 "git" (":(literal)/scp:remote:/path/file.py") ("--no-pager" >>> "diff-index" "--exit-code" "-p" "HEAD" nil "--")) >>> vc-git-command("*vc-diff*" 1 (":(literal)/scp:remote:/path/file.py") "diff-index" "--exit-code" >>> "-p" "HEAD" nil "--") >>> apply(vc-git-command "*vc-diff*" 1 (":(literal)/scp:remote:/path/file.py") "diff-index" >>> "--exit-code" ("-p" "HEAD" nil "--")) >>> vc-git-diff(("/scp:remote:/path/file.py") nil nil "*vc-diff*" t) >>> apply(vc-git-diff (("/scp:remote:/path/file.py") nil nil "*vc-diff*" t)) >>> vc-call-backend(Git diff ("/scp:remote:/path/file.py") nil nil "*vc-diff*" t) >>> vc-diff-internal(t (Git ("/scp:remote:/path/file.py")) nil nil t) >>> vc-diff(nil t) >>> funcall-interactively(vc-diff nil t) >>> call-interactively(vc-diff nil nil) >>> command-execute(vc-diff) >>> >>> Same error on = (vc-diff) in the*vc-dir* buffer. >>> >>> I am pretty sure this is a regression from about 2-3 weeks ago. >>> >>> (vc-next-action also fails) >> This is the result of the git literal pathspec prefix being added in a >> non-tramp-aware way. See bug #39452. The commits in question are >> >> 3502321403 Fix regressions in the last change >> 3572613550 Fix vc-git-state for filenames with wildcards > I do have all these patches, but, alas, I still see the bug. > https://debbugs.gnu.org/cgi/bugreport.cgi?bug=39452 > has no messages for 10 days, I hope it is being worked on... We indeed applied a patch that's been lying around for a while and keep finding regressions. Now I was curious to see how we generally avoid passing remote file names (in Tramp syntax) to Git and other VCS, and it turns out vc-do-command, which almost all calls go though, converts all file names to relative ones. Which the new literal-pathspecs approach in vc-git conflicts with. I'm still not loving the idea of a dynamic variable to enable/disable the use of env var (fix for the problem we/I have met with the other approach), but it's becoming increasingly attractive. That said, I've just pushed a fix (commit 2b62b2a019), please see how it works for you.