Fix Bug#11728: show files updated by git
* lisp/vc/vc-git.el (vc-git--pushpull): Accept extra-args and set `compilation-error-regexp-alist' to `vc-git-error-regexp-alist'. (vc-git-pull): Pass "--stat" as `extra-args' to `vc-git--pushpull'. (vc-git-push): Pass "" as `extra-args' to `vc-git--pushpull'.
This commit is contained in:
parent
5bdc344780
commit
66a491fbec
1 changed files with 6 additions and 4 deletions
|
@ -866,7 +866,7 @@ It is based on `log-edit-mode', and has Git-specific extensions.")
|
|||
;; To be called via vc-pull from vc.el, which requires vc-dispatcher.
|
||||
(declare-function vc-compilation-mode "vc-dispatcher" (backend))
|
||||
|
||||
(defun vc-git--pushpull (command prompt)
|
||||
(defun vc-git--pushpull (command prompt extra-args)
|
||||
"Run COMMAND (a string; either push or pull) on the current Git branch.
|
||||
If PROMPT is non-nil, prompt for the Git command to run."
|
||||
(let* ((root (vc-git-root default-directory))
|
||||
|
@ -891,9 +891,11 @@ If PROMPT is non-nil, prompt for the Git command to run."
|
|||
(vc-run-delayed
|
||||
(vc-compilation-mode 'git)
|
||||
(setq-local compile-command
|
||||
(concat git-program " " command " "
|
||||
(concat git-program " " command " " extra-args " "
|
||||
(if args (mapconcat 'identity args " ") "")))
|
||||
(setq-local compilation-directory root)
|
||||
(setq-local compilation-error-regexp-alist
|
||||
vc-git-error-regexp-alist)
|
||||
;; Either set `compilation-buffer-name-function' locally to nil
|
||||
;; or use `compilation-arguments' to set `name-function'.
|
||||
;; See `compilation-buffer-name'.
|
||||
|
@ -907,13 +909,13 @@ If PROMPT is non-nil, prompt for the Git command to run."
|
|||
"Pull changes into the current Git branch.
|
||||
Normally, this runs \"git pull\". If PROMPT is non-nil, prompt
|
||||
for the Git command to run."
|
||||
(vc-git--pushpull "pull" prompt))
|
||||
(vc-git--pushpull "pull" prompt "--stat"))
|
||||
|
||||
(defun vc-git-push (prompt)
|
||||
"Push changes from the current Git branch.
|
||||
Normally, this runs \"git push\". If PROMPT is non-nil, prompt
|
||||
for the Git command to run."
|
||||
(vc-git--pushpull "push" prompt))
|
||||
(vc-git--pushpull "push" prompt ""))
|
||||
|
||||
(defun vc-git-merge-branch ()
|
||||
"Merge changes into the current Git branch.
|
||||
|
|
Loading…
Add table
Reference in a new issue