GNU bug report logs -
#41341
27.0.91; project.el 0.1.2 project-try-vc() fails in Git subdirectories; patch attached
Previous Next
Reported by: John SJ Anderson <john <at> genehack.org>
Date: Sun, 17 May 2020 01:59:02 UTC
Severity: normal
Found in version 27.0.91
Done: Dmitry Gutov <dgutov <at> yandex.ru>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your bug report
#41341: 27.0.91; project.el 0.1.2 project-try-vc() fails in Git subdirectories; patch attached
which was filed against the emacs package, has been closed.
The explanation is attached below, along with your original report.
If you require more details, please reply to 41341 <at> debbugs.gnu.org.
--
41341: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=41341
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
So: closing.
[Message part 3 (message/rfc822, inline)]
[Message part 4 (text/plain, inline)]
I upgraded packages on 16 May 2020, which resulted in project.el upgrading to v0.1.2.
I restarted Emacs and got the following stack trace:
Debugger entered--Lisp error: (file-missing "Opening input file" "No such file or directory" "/Users/genehack/proj/apollo/models/.git")
insert-file-contents("/Users/genehack/proj/apollo/models/.git")
project-try-vc("/Users/genehack/proj/apollo/models/")
run-hook-with-args-until-success(project-try-vc "/Users/genehack/proj/apollo/models/")
project--find-in-directory("/Users/genehack/proj/apollo/models/")
project-current()
eglot--maybe-activate-editing-mode()
run-hooks(change-major-mode-after-body-hook after-change-major-mode-hook)
normal-mode(t)
after-find-file(nil nil)
find-file-noselect-1(#<buffer index.js> "~/proj/apollo/models/index.js" :nowarn nil "~/proj/apollo/models/index.js" (8667578097 16777222))
find-file-noselect("/Users/genehack/proj/apollo/models/index.js" :nowarn)
desktop-restore-file-buffer("/Users/genehack/proj/apollo/models/index.js" "index.js" nil)
desktop-create-buffer(208 "/Users/genehack/proj/apollo/models/index.js" "index.js" js2-mode (eldoc-mode override-global-mode gcmh-mode global-auto-revert-mode company-mode flymake-mode projectile-mode aggressive-indent-mode flycheck-mode smartparens-mode prettier-js-mode) 1 (nil nil) nil nil ((buffer-display-time 24256 19314 922097 0) (buffer-file-coding-system . undecided-unix)) ((mark-ring nil)))
eval-buffer(#<buffer *load*> nil "/Users/genehack/.emacs.d/.emacs.desktop" nil t) ; Reading at buffer position 9385
load-with-code-conversion("/Users/genehack/.emacs.d/.emacs.desktop" "/Users/genehack/.emacs.d/.emacs.desktop" t t)
load("/Users/genehack/.emacs.d/.emacs.desktop" t t t)
desktop-read()
#f(compiled-function () #<bytecode 0x1fe27544cc95>)()
run-hooks(after-init-hook delayed-warnings-hook)
command-line()
normal-top-level()
I verified that falling back to project-0.1.el fixed the issue. Looking at the diff between 0.1 and 0.1.2, I was able to concoct the following patch, which seems to resolve the issue:
--- ./upstream-project-0.1.2.el 2020-05-16 13:51:19.000000000 -0700
+++ elpa/project-0.1.2/project.el 2020-05-16 13:50:15.000000000 -0700
@@ -275,7 +275,7 @@
;; Don't stop at submodule boundary.
(or (vc-file-getprop dir 'project-git-root)
(let* ((default-directory dir)
- (root (vc-root-dir))
+ (root (vc-find-root dir ".git/"))
(gitfile (expand-file-name ".git" root)))
(vc-file-setprop
dir 'project-git-root
Information generated by `report-emacs-bug` is below:
In GNU Emacs 27.0.91 (build 1, x86_64-apple-darwin19.3.0, NS appkit-1894.30 Version 10.15.3 (Build 19D76))
of 2020-04-25 built on phineas.home.genehack.org
Windowing system distributor 'Apple', version 10.3.1894
System Description: Mac OS X 10.15.4
Configured using:
'configure --with-gnutls=yes --without-makeinfo --with-ns CPPFLAGS=-I/usr/local/opt/libxml2/include/libxml2 PKG_CONFIG_PATH=/usr/local/lib/pkgconfig'
[Message part 5 (text/html, inline)]
This bug report was last modified 5 years and 61 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.