aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/vc/vc-git.el10
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.
871If PROMPT is non-nil, prompt for the Git command to run." 871If 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.
908Normally, this runs \"git pull\". If PROMPT is non-nil, prompt 910Normally, this runs \"git pull\". If PROMPT is non-nil, prompt
909for the Git command to run." 911for 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.
914Normally, this runs \"git push\". If PROMPT is non-nil, prompt 916Normally, this runs \"git push\". If PROMPT is non-nil, prompt
915for the Git command to run." 917for 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.