summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--etc/NEWS6
-rw-r--r--lisp/vc/vc-git.el2
2 files changed, 8 insertions, 0 deletions
diff --git a/etc/NEWS b/etc/NEWS
index b1db3b7c331..bf19c34f021 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -886,6 +886,12 @@ keys, add the following to your init file:
** Change Logs and VC
+*** vc-git now sets the GIT_LITERAL_PATHSPECS environment variable.
+This ensures that Git operations on files containing wildcard
+characters work as they're supposed to. However, this also affects
+scripts running from Git hooks, and these have to "unset
+GIT_LITERAL_PATHSPECS" to work as before.
+
*** More VC commands can be used from non-file buffers.
The relevant commands are those that don't change the VC state.
The non-file buffers which can use VC commands are those that have
diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el
index 5828a83debc..143087122fd 100644
--- a/lisp/vc/vc-git.el
+++ b/lisp/vc/vc-git.el
@@ -1772,6 +1772,7 @@ The difference to vc-do-command is that this function always invokes
(process-environment
(append
`("GIT_DIR"
+ "GIT_LITERAL_PATHSPECS=1"
;; Avoid repository locking during background operations
;; (bug#21559).
,@(when revert-buffer-in-progress-p
@@ -1806,6 +1807,7 @@ The difference to vc-do-command is that this function always invokes
(process-environment
(append
`("GIT_DIR"
+ "GIT_LITERAL_PATHSPECS=1"
;; Avoid repository locking during background operations
;; (bug#21559).
,@(when revert-buffer-in-progress-p