diff options
| author | Sam Steingold | 2017-11-01 19:13:46 -0400 |
|---|---|---|
| committer | Alan Third | 2018-06-12 21:15:02 +0100 |
| commit | 66a491fbec005b6a7ba255612ddb6efcf1a4bbcb (patch) | |
| tree | 2778287b410e8566c38b1e2405b3a0736ecb11e2 | |
| parent | 5bdc344780faabbc91b7e55306b2071dffb44fa2 (diff) | |
| download | emacs-66a491fbec005b6a7ba255612ddb6efcf1a4bbcb.tar.gz emacs-66a491fbec005b6a7ba255612ddb6efcf1a4bbcb.zip | |
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'.
| -rw-r--r-- | lisp/vc/vc-git.el | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el index efe853e5eeb..6650c5d764a 100644 --- a/lisp/vc/vc-git.el +++ b/lisp/vc/vc-git.el | |||
| @@ -866,7 +866,7 @@ It is based on `log-edit-mode', and has Git-specific extensions.") | |||
| 866 | ;; To be called via vc-pull from vc.el, which requires vc-dispatcher. | 866 | ;; To be called via vc-pull from vc.el, which requires vc-dispatcher. |
| 867 | (declare-function vc-compilation-mode "vc-dispatcher" (backend)) | 867 | (declare-function vc-compilation-mode "vc-dispatcher" (backend)) |
| 868 | 868 | ||
| 869 | (defun vc-git--pushpull (command prompt) | 869 | (defun vc-git--pushpull (command prompt extra-args) |
| 870 | "Run COMMAND (a string; either push or pull) on the current Git branch. | 870 | "Run COMMAND (a string; either push or pull) on the current Git branch. |
| 871 | If PROMPT is non-nil, prompt for the Git command to run." | 871 | If PROMPT is non-nil, prompt for the Git command to run." |
| 872 | (let* ((root (vc-git-root default-directory)) | 872 | (let* ((root (vc-git-root default-directory)) |
| @@ -891,9 +891,11 @@ If PROMPT is non-nil, prompt for the Git command to run." | |||
| 891 | (vc-run-delayed | 891 | (vc-run-delayed |
| 892 | (vc-compilation-mode 'git) | 892 | (vc-compilation-mode 'git) |
| 893 | (setq-local compile-command | 893 | (setq-local compile-command |
| 894 | (concat git-program " " command " " | 894 | (concat git-program " " command " " extra-args " " |
| 895 | (if args (mapconcat 'identity args " ") ""))) | 895 | (if args (mapconcat 'identity args " ") ""))) |
| 896 | (setq-local compilation-directory root) | 896 | (setq-local compilation-directory root) |
| 897 | (setq-local compilation-error-regexp-alist | ||
| 898 | vc-git-error-regexp-alist) | ||
| 897 | ;; Either set `compilation-buffer-name-function' locally to nil | 899 | ;; Either set `compilation-buffer-name-function' locally to nil |
| 898 | ;; or use `compilation-arguments' to set `name-function'. | 900 | ;; or use `compilation-arguments' to set `name-function'. |
| 899 | ;; See `compilation-buffer-name'. | 901 | ;; See `compilation-buffer-name'. |
| @@ -907,13 +909,13 @@ If PROMPT is non-nil, prompt for the Git command to run." | |||
| 907 | "Pull changes into the current Git branch. | 909 | "Pull changes into the current Git branch. |
| 908 | Normally, this runs \"git pull\". If PROMPT is non-nil, prompt | 910 | Normally, this runs \"git pull\". If PROMPT is non-nil, prompt |
| 909 | for the Git command to run." | 911 | for the Git command to run." |
| 910 | (vc-git--pushpull "pull" prompt)) | 912 | (vc-git--pushpull "pull" prompt "--stat")) |
| 911 | 913 | ||
| 912 | (defun vc-git-push (prompt) | 914 | (defun vc-git-push (prompt) |
| 913 | "Push changes from the current Git branch. | 915 | "Push changes from the current Git branch. |
| 914 | Normally, this runs \"git push\". If PROMPT is non-nil, prompt | 916 | Normally, this runs \"git push\". If PROMPT is non-nil, prompt |
| 915 | for the Git command to run." | 917 | for the Git command to run." |
| 916 | (vc-git--pushpull "push" prompt)) | 918 | (vc-git--pushpull "push" prompt "")) |
| 917 | 919 | ||
| 918 | (defun vc-git-merge-branch () | 920 | (defun vc-git-merge-branch () |
| 919 | "Merge changes into the current Git branch. | 921 | "Merge changes into the current Git branch. |