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#50572: 28.0.50; [PATCH] fix VC to find the responsible backend with the most specific path. Date: Tue, 14 Sep 2021 02:48:11 +0300 Message-ID: References: <877dfkxyt4.fsf@elite.giraud> <83y280cv8g.fsf@gnu.org> 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="25250"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 Cc: 50572@debbugs.gnu.org To: Eli Zaretskii , Manuel Giraud Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Sep 14 01:49:12 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 1mPvhI-0006Mp-J8 for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 14 Sep 2021 01:49:12 +0200 Original-Received: from localhost ([::1]:43092 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mPvhG-0006Fh-Fm for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 13 Sep 2021 19:49:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50376) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mPvh8-0006FV-FV for bug-gnu-emacs@gnu.org; Mon, 13 Sep 2021 19:49:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:35530) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mPvh8-0007Ne-8F for bug-gnu-emacs@gnu.org; Mon, 13 Sep 2021 19:49:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mPvh8-0005PX-6m for bug-gnu-emacs@gnu.org; Mon, 13 Sep 2021 19:49:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 13 Sep 2021 23:49:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50572 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 50572-submit@debbugs.gnu.org id=B50572.163157690220751 (code B ref 50572); Mon, 13 Sep 2021 23:49:02 +0000 Original-Received: (at 50572) by debbugs.gnu.org; 13 Sep 2021 23:48:22 +0000 Original-Received: from localhost ([127.0.0.1]:47076 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mPvgT-0005Od-QR for submit@debbugs.gnu.org; Mon, 13 Sep 2021 19:48:21 -0400 Original-Received: from mail-wm1-f45.google.com ([209.85.128.45]:44749) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mPvgR-0005OP-NK for 50572@debbugs.gnu.org; Mon, 13 Sep 2021 19:48:20 -0400 Original-Received: by mail-wm1-f45.google.com with SMTP id l7-20020a1c2507000000b002e6be5d86b3so1107271wml.3 for <50572@debbugs.gnu.org>; Mon, 13 Sep 2021 16:48:19 -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=vwOmL9CEVlsi3hGujmxOWr6ozZVe40LMYqQleGPSuI0=; b=NRvphawq/BmRsOiYokzbLHu0XIuYCwmn2pLHyjarchiaq7fgS3EQADkkXFd9ae/Q+F NCeCP9Pzx1wK1wsEa/07hZJmEi9+XKaZU4/xE71zX+1jS1vZnzUcxnW59qXd8kBWxBEW 46uPWO5PtXTNC2SsdsxgbiNSPM/oHhARQrZCNmeP5oeA5KE2F0E3VjELI2KQ3xVmZeMq ynD0MJoq1XDFQ3oDjEDmcDU18pyc6p8RA+CnjgzKCmE9LoNu5/HEPnNaQAQEZ+89VSx/ 2RM8rWJquHchPYnjyrek6xHFULr0vR28As2yvaIr6tUGUMn9txc+ge5Ls+alhzZKrVh3 3Hgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=vwOmL9CEVlsi3hGujmxOWr6ozZVe40LMYqQleGPSuI0=; b=AUP8KpQxrHPoxo4Rn25naIlMQ47NF3gSxQWw78A25uZ1mXi50XUhSHYI1x/X8pvBfo BobcbxrOALi+zZehpJM8VFesB/lBgdFR89X1IyqUWDns1pWmXVN/FnSbX7q17mzt+7GV 5Dd6P6KaTGpH40hIcipYkDFy3Ggmrt08HWOajXVqI9vzgu6sgtmziZtyNdokdu3bWBWo tgpKNVfpC3Tdzg6AwBvssghCJxxafBcZE6Q6o5P9FdjBcBpHMk4LGgEei5EHNXqHir+r f2a1Ea5+Cxi/9LCFxObaZCR4lDh/MUNuefAqSylrd1yp2EXu/7wvB6sd1a/VFogRHFWJ 80Xw== X-Gm-Message-State: AOAM5334Ds2NJDkNERlQh3DLFfWumGJioceD3lZHbghtoJEKM/yqUliy lOeO8t3/8dYAAOQrLGbxCAtjvrGIt/Q= X-Google-Smtp-Source: ABdhPJw/BJ+lEuSYzVULLl0Nl6B0VpOzcCfOP1xXBmRz5Z6mN3nB2gomljPZPehRJejLiN3KwAeEYA== X-Received: by 2002:a1c:7e8a:: with SMTP id z132mr13375073wmc.75.1631576894008; Mon, 13 Sep 2021 16:48:14 -0700 (PDT) Original-Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id v18sm1984973wml.44.2021.09.13.16.48.13 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 13 Sep 2021 16:48:13 -0700 (PDT) In-Reply-To: <83y280cv8g.fsf@gnu.org> 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:214273 Archived-At: On 13.09.2021 19:10, Eli Zaretskii wrote: >> From: Manuel Giraud >> Date: Mon, 13 Sep 2021 17:47:19 +0200 >> >> When calling 'vc-next-action' on an unregistered file, VC could choose a >> backend that is very far above this file in the directory hierarchy. >> >> In my case, it chooses SVN as backend (because I have one in my homedir) >> but I wanted it to choose the Git backend of the directory this file >> resides. >> >> This patch solves this issue by selecting the backend with the most >> specific (in fact, the longest string) path to the file. > Isn't that already available with "C-u C-x v v"? A better default is an improvement anyway. I think the patch is a good idea, especially given that vc-responsible-backend has only recently been changed in the same way (commit 2697123933).