GNU bug report logs - #51614
29.0.50; [PATCH] vc-switches ignore file or directory variables

Previous Next

Package: emacs;

Reported by: Aleksandr Vityazev <avityazev <at> posteo.org>

Date: Fri, 5 Nov 2021 16:40:02 UTC

Severity: normal

Found in version 29.0.50

Full log


View this message in rfc822 format

From: Aleksandr Vityazev <avityazev <at> posteo.org>
To: 51614 <at> debbugs.gnu.org
Subject: bug#51614: 29.0.50; [PATCH] vc-switches ignore file or directory variables
Date: Fri, 05 Nov 2021 16:39:49 +0000
[Message part 1 (text/plain, inline)]
Hello,

The current implementation of the vc-switches function from
lisp/vc/vc.el ignores the values ​​of vc-BACKEND-diff-switches,
vc-diff-switches set as local directory or file variables.

Here's a reproduction:

1. Run "emacs -Q"
2. "C-x C-f" to open file /tmp/test-project/.dir-locals.el
3. Type this into the buffer:
((nil ((vc-git-diff-switches . ("--binary" "--textconv")))))
4. "C-x C-s" to save the buffer
5. "C-x C-f" to open the file /tmp/test-project/test.gpg.
Without --binary and --textconv, diff will not be displayed
for a file with a .gpg extension.
6. Type something in the buffer for example: "Just a test"
7. "C-x C-s" to save the file
8. "C-x v v" to choose VCS backend: in this case, Git
and register the file under VCS
9. "C-x v v" to commit changes
10. Type commit message and "C-c C-c"
11. Type something in the buffer with file /tmp/test-project/test.gpg
12. "C-x C-s" to save the buffer
13. "C-x v =" to show the diff
14. Bug occurs: diff is not displayed.


Perhaps the attached patch can solve the problem.

[0001-lisp-vc-vc.el-vc-switches-Handle-dir-local-variables.patch (text/x-patch, attachment)]
[Message part 3 (text/plain, inline)]
-- 
Best regards,
Aleksandr Vityazev

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

Previous Next


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