(vc-compilation-mode 'git)
(setq-local compile-command
(concat git-program " " command " "
- (if args (mapconcat 'identity args " ") "")))))
+ (if args (mapconcat 'identity args " ") "")))
+ (setq-local compilation-directory root)
+ ;; Either set `compilation-buffer-name-function' locally to nil
+ ;; or use `compilation-arguments' to set `name-function'.
+ ;; See `compilation-buffer-name'.
+ (setq-local compilation-arguments
+ (list compile-command nil
+ (lambda (_name-of-mode) buffer)
+ nil))))
(vc-set-async-update buffer)))
(defun vc-git-pull (prompt)
(vc-compilation-mode 'hg)
(setq-local compile-command
(concat hg-program " " command " "
- (if args (mapconcat 'identity args " ") "")))))
+ (if args (mapconcat 'identity args " ") "")))
+ (setq-local compilation-directory root)
+ ;; Either set `compilation-buffer-name-function' locally to nil
+ ;; or use `compilation-arguments' to set `name-function'.
+ ;; See `compilation-buffer-name'.
+ (setq-local compilation-arguments
+ (list compile-command nil
+ (lambda (_name-of-mode) buffer)
+ nil))))
(vc-set-async-update buffer)))))
(defun vc-hg-pull (prompt)