branch: externals/vc-jj
commit cca23877c11df80de9c46d7dafbb775ac4724e4c
Author: Kristoffer Balintona <[email protected]>
Commit: Kristoffer Balintona <[email protected]>
fix: Allow directories to be passed to `vc-jj--filename-to-fileset`
There are various scenarios in which directories may be passed to
vc-jj; previously these cases were not handled properly. As an
example, when calling `vc-next-action` on a vc-dir buffer with a
directory marked, the expected behavior is for all changed files in
that directory to be committed. However, the actual behavior was that
none of these files would be committed.
The cause is in `vc-jj--filename-to-fileset`: it used the "cwd-file"
and "root-file" jj file patterns. However, these file patterns do not
match files under directories. Instead, to match files under
directories recursively, the "cwd" and "root" file patterns should be
used.
Fixes #62.
---
vc-jj.el | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/vc-jj.el b/vc-jj.el
index 4a2d565eb1..e1365b4d6a 100644
--- a/vc-jj.el
+++ b/vc-jj.el
@@ -116,10 +116,10 @@ If nil, use the value of `vc-diff-switches'. If t, use
no switches."
If ROOT is non-nil, the resulting fileset is relative to the repository
root, otherwise it is relative to the current directory."
(if root
- (concat "root-file:\""
+ (concat "root:\""
(string-replace "\"" "\\\"" (file-relative-name filename root))
"\"")
- (concat "cwd-file:\""
+ (concat "file:\""
(string-replace "\"" "\\\"" (file-relative-name filename)) "\"")))
(defun vc-jj--process-lines (&rest args)