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.devel Subject: Re: master 370b216f086: New variable 'project-files-relative-names' Date: Sun, 05 May 2024 20:43:20 +0300 Message-ID: <86fruwcfyf.fsf@gnu.org> References: <171487980736.28387.14971069985522275144@vcs2.savannah.gnu.org> <20240505033008.78DF3C2BC8C@vcs2.savannah.gnu.org> <87r0egu23d.fsf@gmx.de> <86cyq0ei31.fsf@gnu.org> <86zft4cpea.fsf@gnu.org> <41d7d4e9-1566-4df1-90dc-8d7f6d06dee2@gutov.dev> <86plu0cjqj.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20719"; mail-complaints-to="usenet@ciao.gmane.io" Cc: michael.albinus@gmx.de, emacs-devel@gnu.org To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun May 05 19:44:03 2024 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 1s3fu6-0005B8-Vp for ged-emacs-devel@m.gmane-mx.org; Sun, 05 May 2024 19:44:03 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s3ftW-00049S-Ht; Sun, 05 May 2024 13:43:26 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s3ftU-000491-F2 for emacs-devel@gnu.org; Sun, 05 May 2024 13:43:24 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s3ftU-0000Zj-4E; Sun, 05 May 2024 13:43:24 -0400 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=tXGt2rOZM52mGvZuKLN3IrS6Cn8vlpjm9w7j6BJhhSc=; b=OOll+FzIBFJk TaoyxWyhhs5DhJwQYUCJ/4ScF2e3hn8nOKnNzh0JMJGObeFUPN/rZ3GUHBEy3yeQvxzv/njvLZ+pl Ud0SLJrPsRHxybo3m+7slMlYyjTkehowK0ThN8Cd3bjtaJeGtdUg6OsGFF6l6n2poAO9uEi4g9GpR 3oKFUgo92/7RKIXOfr55x08BHZorhENbipfRAzxPqtHrSRgWZNp6hj04dhSHen/ZLzK1UkHmtlkqj YelARBiOztnvXk9Et92DLIMIxPedumT5ZMlSbrHXrXGVfv16mK01VSUQbqE3/nDL/g3fKBhNRMZjs WUFeEUnLvdgYkaiGL5UC/g==; In-Reply-To: (message from Dmitry Gutov on Sun, 5 May 2024 20:28:56 +0300) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:318855 Archived-At: > Date: Sun, 5 May 2024 20:28:56 +0300 > Cc: michael.albinus@gmx.de, emacs-devel@gnu.org > From: Dmitry Gutov > > > Maybe it's some other problem with it, because these pathspecs are > > documented in my Git's man pages, but the commands I tried came up > > with an empty list on my system, but with a non-empty list on another > > one, where a newer Git is installed. Could you perhaps show an > > example of such a command line that I could try here? > > BTW, the pathspecs are only used when the EXTRA-IGNORES argument is > non-nil. Meaning project-vc-ignores is set, either globally or through > dir-locals. Perhaps you have a value in there that confuses Git? I'm only running the test, so EXTRA-IGNORES are as the project-vc-supports-project-in-different-dir test sets it. > > Here's what the command looks like if I just set project-vc-ignores to > '("./test"): > > git --no-pager ls-files -z -c --exclude-standard -o -- :(exclude,glob,top)test . This fails here with: bash: syntax error near unexpected token `(' and I need to quote ":(exclude,glob,top)test" to get a list of files. > > Regardless, top of the backtrace from the failure looks like this: > > > > Test project-vc-supports-project-in-different-dir backtrace: > > string-match("\0" nil 0) > > split-string(nil "\0" t) > > project--vc-list-files("d:/gnu/git/emacs/trunk/test/lisp/progmodes/p > > > > IOW, it tries to split-string nil. > > Yeah, the error was somewhat cryptic. I've now pushed a patch below that > should print the VCS command used when an error happens, see if it makes > things more clear. Thanks, with this patch I get Test project-vc-supports-project-in-different-dir condition: (error "Failed (status 128): git --no-pager ls-files -z -c --exclude-standard -o -- :(exclude,glob,top)**/etc .") And if I quote the ":(exclude,glob,top)**/etc" pathspec in project-vc-supports-project-in-different-dir, I get the nil value again: Test project-vc-supports-project-in-different-dir condition: (ert-test-failed ((should (equal '(".dir-locals.el" "foo") (mapcar ... ...))) :form (equal (".dir-locals.el" "foo") nil) :value nil :explanation (different-types (".dir-locals.el" "foo") nil))) This could be Windows-specific: Git is invoked via a script, which might not behave correctly with quoting.