GNU bug report logs - #65704
29.1; Most code of `project-ignores' seems to be dead code

Previous Next

Package: emacs;

Reported by: Damien Cassou <damien <at> cassou.me>

Date: Sat, 2 Sep 2023 16:04:01 UTC

Severity: wishlist

Found in version 29.1

Done: Dmitry Gutov <dmitry <at> gutov.dev>

Bug is archived. No further changes may be made.

Full log


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Damien Cassou <damien <at> cassou.me>
To: bug-gnu-emacs <at> gnu.org
Cc: Dmitry Gutov <dgutov <at> yandex.ru>
Subject: 29.1; Most code of `project-ignores' seems to be dead code
Date: Sat, 02 Sep 2023 18:03:04 +0200
Hi,

The function `project-ignores' starts like this:

  (cl-defmethod project-ignores ((project (head vc)) dir)
    (let* ((root (nth 2 project))
           backend)
      (append
       (when (and backend
                  (file-equal-p dir root))

It seems to me that `backend' is always going to be nil at this point
and thus the 25-line long `when' block will always return nil without
doing anything.

Am I missing something?

This code seems to have been introduced in commit
785fa801596ad7bb9f838cac865f00de29e253d1 "New user option:
project-vc-extra-root-markers".

Best

-- 
Damien Cassou

"Success is the ability to go from one failure to another without
losing enthusiasm." --Winston Churchill




This bug report was last modified 1 year and 289 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.