From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.devel Subject: Re: Breakage by commit "779bc886f9 * Improve detection of Git submodules" Date: Sat, 16 May 2020 00:03:53 +0300 Message-ID: References: <87mu69xbq0.fsf@gnu.org> <871rnluglr.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="ciao.gmane.io:159.69.161.202"; logging-data="30987"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri May 15 23:04:48 2020 Return-path: Envelope-to: ged-emacs-devel@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 1jZhVf-0007xP-WD for ged-emacs-devel@m.gmane-mx.org; Fri, 15 May 2020 23:04:48 +0200 Original-Received: from localhost ([::1]:50878 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jZhVf-0005lP-1c for ged-emacs-devel@m.gmane-mx.org; Fri, 15 May 2020 17:04:47 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41340) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jZhUt-0004wc-Bc for emacs-devel@gnu.org; Fri, 15 May 2020 17:03:59 -0400 Original-Received: from mail-wm1-x344.google.com ([2a00:1450:4864:20::344]:54133) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jZhUr-0001CD-Tz for emacs-devel@gnu.org; Fri, 15 May 2020 17:03:58 -0400 Original-Received: by mail-wm1-x344.google.com with SMTP id k12so3591476wmj.3 for ; Fri, 15 May 2020 14:03:57 -0700 (PDT) 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=zhFnU2PPxcDY5+dxDLnmq9qk9mkuie4xeukevLF8nwI=; b=idlXs6D2dy9WO99PtY5J6xIFoeXzKrhVs0orjXfjZUMQk9YKm3XFNpChYRT01SBuWq 1AfvluelwMXGrfAapw6ACW0t3dOHu2BUf7gBZgZq2TNByBqq8jaA8VZd32OZyW8tM+E7 LyGL1ekoZfJXRSN9ugURzu3nRMRuG5cHIe+zon911eJxKnyZ+PpKZ6VLc0BAzm5KFxQs dQ0skBKhhzsT90Sjw8gV43WCHhsAJ1OEKwj1Y9wYBTDqcXhgHCM7aCEoMqese/Cje/sj xPvh2R1+XhlWHJywij7qz9l52UxqoaExC+2d90gOTGS2kCnCmFL2SF1CG4ws3S3z0OEt Nkog== 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=zhFnU2PPxcDY5+dxDLnmq9qk9mkuie4xeukevLF8nwI=; b=VU7HQF8KbBbGcROz5KwPk2UxKW6/eUzel4yUpXLKbbcRUlIrKLeb3mJ6v1PDMNPO4Z wk98YrxoAYvfMfOMy7t/Cj+2etqkCNZLHzczFjOubNh8vESCwrs5wyF3SgrBG0NH5Ftr y7NztmKfAdYFkTI3tC+L41TNnw2o6uy0xfEe0bf32z4vre2PBzSTajC1Ycsu8DAXxDRi kofB9ibnS/zadkIumGlQVevhz3RyUYriADS4GcoGPul/yNVPjX3LCtUMDepmQ9MHezWb ublSltj6cfs0o+gHMaM73uQCmQDmWQje0ZwN4LMQCCmyu0Cug6GHtyNRdZcIFoSdh3kX HtGg== X-Gm-Message-State: AOAM5328qL6Z8t56axmtxug3XZJAPcTXidlKCclTk70T0giipnugrV+T uiCubt/VRieT8zYVLNZnkEyGrGCT X-Google-Smtp-Source: ABdhPJxirhifb82GPWmyQILhZhPp/+uQiWfK3fDRky7UccYLxgkt2gVv2Dx+vamKIPJ0C8tK2Y0NNQ== X-Received: by 2002:a1c:808c:: with SMTP id b134mr6153628wmd.131.1589576635788; Fri, 15 May 2020 14:03:55 -0700 (PDT) Original-Received: from [192.168.0.3] ([66.205.73.129]) by smtp.googlemail.com with ESMTPSA id 60sm5492768wrp.92.2020.05.15.14.03.54 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 15 May 2020 14:03:55 -0700 (PDT) In-Reply-To: <871rnluglr.fsf@gnu.org> Content-Language: en-US Received-SPF: pass client-ip=2a00:1450:4864:20::344; envelope-from=raaahh@gmail.com; helo=mail-wm1-x344.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:250428 Archived-At: On 15.05.2020 22:45, Tassilo Horn wrote: > I've edebugged, and the problem is that > > (let ((default-directory "~/Repos/el/emacs/lisp/net")) > (vc-root-dir)) ;=> nil > > That's because `vc-deduce-backend' returns nil. It only looks at > default-directory when in dired-mode, shell-mode, or compilation-mode... Oh, okay. Sorry about that. Does this patch fix the situation? diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index faa60d123f..0ce2786a4d 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el @@ -274,8 +274,7 @@ project-try-vc ('Git ;; Don't stop at submodule boundary. (or (vc-file-getprop dir 'project-git-root) - (let* ((default-directory dir) - (root (vc-root-dir)) + (let* ((root (vc-call-backend backend 'root dir)) (gitfile (expand-file-name ".git" root))) (vc-file-setprop dir 'project-git-root @@ -287,9 +286,8 @@ project-try-vc (goto-char (point-min)) (looking-at "gitdir: [./]+/\.git/modules/")) (let* ((parent (file-name-directory - (directory-file-name root))) - (default-directory parent)) - (vc-root-dir))) + (directory-file-name root)))) + (vc-call-backend backend 'root parent))) (t root))) ))) ('nil nil)