From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#50572: 28.0.50; [PATCH] fix VC to find the responsible backend with the most specific path. Date: Thu, 11 Nov 2021 09:06:07 +0200 Message-ID: <83y25v189s.fsf@gnu.org> References: <877dfkxyt4.fsf@elite.giraud> <87cznef8ah.fsf@gnus.org> <86ilx5iaze.fsf@gmail.com> <87pmrdb0zv.fsf@gnus.org> <86mtmgx6gg.fsf@gmail.com> <87fe707b-f2b4-febd-d2ae-acc697b4cee1@yandex.ru> <87zgqgjeaz.fsf@gnus.org> <87cznbt2r1.fsf@elite.giraud> <87h7cn803w.fsf@gnus.org> <878rxzszl8.fsf@elite.giraud> <877ddiuhv7.fsf@gnus.org> <87y25x3e6g.fsf@elite.giraud> <87a6icoqkm.fsf@gnus.org> <8856c512-a603-fa3e-bf21-c191a8a45afa@yandex.ru> <87bl2slv3j.fsf@gnus.org> <87y25wkfnb.fsf@gnus.org> <838rxw41dt.fsf@gnu.org> <87h7ckf9oz.fsf@gnus.org> <83sfw42ipa.fsf@gnu.org> <87zgqbe6xu.fsf@gnus.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6636"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 50572@debbugs.gnu.org, andrewjmoreton@gmail.com, manuel@ledu-giraud.fr, dgutov@yandex.ru To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Nov 11 08:07:18 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 1ml4B4-0001bd-Av for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 11 Nov 2021 08:07:18 +0100 Original-Received: from localhost ([::1]:37784 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ml4B2-00036Z-Hk for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 11 Nov 2021 02:07:16 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:60030) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ml4Ar-00035k-7v for bug-gnu-emacs@gnu.org; Thu, 11 Nov 2021 02:07:05 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:56705) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ml4Ao-0003kH-Hd for bug-gnu-emacs@gnu.org; Thu, 11 Nov 2021 02:07:04 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ml4Ao-0005Qc-9V for bug-gnu-emacs@gnu.org; Thu, 11 Nov 2021 02:07:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 11 Nov 2021 07:07: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.163661438120807 (code B ref 50572); Thu, 11 Nov 2021 07:07:02 +0000 Original-Received: (at 50572) by debbugs.gnu.org; 11 Nov 2021 07:06:21 +0000 Original-Received: from localhost ([127.0.0.1]:40018 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ml4A8-0005PX-M3 for submit@debbugs.gnu.org; Thu, 11 Nov 2021 02:06:20 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:59200) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ml4A5-0005PH-VJ for 50572@debbugs.gnu.org; Thu, 11 Nov 2021 02:06:18 -0500 Original-Received: from [2001:470:142:3::e] (port=43828 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ml49z-0003bC-Sp; Thu, 11 Nov 2021 02:06:11 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=7ak8uxcGULe/3FMlMDU5WTu8Nl3Vy8L9BDiF0hptHDs=; b=jyxGUld+aOhy ZNcXM2yroKGrsfDj8IZx/jLjEssopzyflQ7HgbMlS/jhfqWTQl8EyL4vmressXphywLLM3qoz2bVQ Z6laKNeR4RebDHZ3hDCM+lUrbYoWMR5G7yYU6kz00p4gEEFn1q5JGgJiroushqGdv40Mc/VoU3PRh 4UgjZyFhSyL8FfU7cbSX1aoM9daho0MSXr5vtg6kv+I6Vk9JGcjabgnIzXb0RqMuu+0mELNqz17Gw gGVAxaEpJYwe+sotn9K9YEEATvLhw4DA+hgsnfvovkvnmSHXlQv+curVckcyhMJbwtpMaR4bq893u VLpZKCmB6mC0r6wj+4KxxA==; Original-Received: from [87.69.77.57] (port=4328 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ml49z-0003Ei-Fy; Thu, 11 Nov 2021 02:06:11 -0500 In-Reply-To: <87zgqbe6xu.fsf@gnus.org> (message from Lars Ingebrigtsen on Thu, 11 Nov 2021 03:56:29 +0100) 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:219605 Archived-At: > From: Lars Ingebrigtsen > Cc: dgutov@yandex.ru, 50572@debbugs.gnu.org, andrewjmoreton@gmail.com, > manuel@ledu-giraud.fr > Date: Thu, 11 Nov 2021 03:56:29 +0100 > > Eli Zaretskii writes: > > > We can always use "/\\" as SEPARATORS on MS-Windows, can't we? > > I was wondering about that -- are both of those characters disallowed in > file name components on Windows? Yes. Windows APIs recognize '/' as (another) directory separator, and so using it in file names is not allowed. > If so, then yes. What would be the test to identify the systems > where this is the case? (memq system-type '(windows-nt ms-dos)) > > But if we want a function that returns the "depth" of a file in a > > filesystem, then it will need to call expand-file-name internally > > anyway, for the same reason I point out above, right? > > Yes. This function can be used as a component in that calculation, but > if that's the purpose of the call, then the caller has to make the file > name non-relative first. If we will require the caller to provide an absolute file name, then why not call expand-file-name internally? We are not saving anyone from any potentially expensive operation, because ensuring a file name is an absolute one without calling expand-file-name is notoriously hard and unreliable in Emacs. So in practice, if the requirement is to provide an absolute file name, the callers will always call expand-file-name anyway.