GNU bug report logs -
#50422
28.0.50; vc-git-checkout: accept nil as first argument
Previous Next
Reported by: Tino Calancha <tino.calancha <at> gmail.com>
Date: Mon, 6 Sep 2021 07:12:01 UTC
Severity: normal
Found in version 28.0.50
Done: Dmitry Gutov <dgutov <at> yandex.ru>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 50422 in the body.
You can then email your comments to 50422 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
39452 <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#50422
; Package
emacs
.
(Mon, 06 Sep 2021 07:12:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Tino Calancha <tino.calancha <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
39452 <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
.
(Mon, 06 Sep 2021 07:12:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
X-Debbugs-Cc: 39452 <at> debbugs.gnu.org
Before the fix from bug#39452, the following was a valid call:
(vc-git-checkout nil "master")
Note that `vc-git-command' handles a nil 3rd argument.
(I rely in such a behavior).
Since we call now `vc-git--literal-pathspec' in several commands, then
we could add a check at the beginning of this function:
--8<-----------------------------cut here---------------start------------->8---
diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el
index 037fbcbc48..18ec4b6075 100644
--- a/lisp/vc/vc-git.el
+++ b/lisp/vc/vc-git.el
@@ -245,11 +245,12 @@ vc-git-update-on-retrieve-tag
(defun vc-git--literal-pathspec (file)
"Prepend :(literal) path magic to FILE."
;; Good example of file name that needs this: "test[56].xx".
- (let ((lname (file-local-name file)))
- ;; Expand abbreviated file names.
- (when (file-name-absolute-p lname)
- (setq lname (expand-file-name lname)))
- (and file (concat ":(literal)" lname))))
+ (when (stringp file)
+ (let ((lname (file-local-name file)))
+ ;; Expand abbreviated file names.
+ (when (file-name-absolute-p lname)
+ (setq lname (expand-file-name lname)))
+ (and file (concat ":(literal)" lname)))))
(defun vc-git--literal-pathspecs (files)
"Prepend :(literal) path magic to FILES."
--8<-----------------------------cut here---------------end--------------->8---
In GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.30, cairo version 1.16.0)
of 2021-09-05 built on localhost.example.com
Repository revision: c61e2bff44bc494be15ba0a9f0f964389fd45b25
Repository branch: 46374-fix-regression
Windowing system distributor 'The X.Org Foundation', version 11.0.12013000
System Description: openSUSE Tumbleweed
Reply sent
to
Dmitry Gutov <dgutov <at> yandex.ru>
:
You have taken responsibility.
(Tue, 07 Sep 2021 23:35:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Tino Calancha <tino.calancha <at> gmail.com>
:
bug acknowledged by developer.
(Tue, 07 Sep 2021 23:35:02 GMT)
Full text and
rfc822 format available.
Message #10 received at 50422-done <at> debbugs.gnu.org (full text, mbox):
Hi Tino,
On 06.09.2021 10:11, Tino Calancha wrote:
> X-Debbugs-Cc:39452 <at> debbugs.gnu.org
>
> Before the fix from bug#39452, the following was a valid call:
>
> (vc-git-checkout nil "master")
>
> Note that `vc-git-command' handles a nil 3rd argument.
> (I rely in such a behavior).
>
> Since we call now `vc-git--literal-pathspec' in several commands, then
> we could add a check at the beginning of this function:
Yes, I broke this with the most recent fix in that area. Sorry.
Should be fixed now with commit ff2c4a8353.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Wed, 06 Oct 2021 11:24:06 GMT)
Full text and
rfc822 format available.
This bug report was last modified 2 years and 201 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.