diff options
author | Tom Willemsen | 2012-05-20 15:17:21 +0200 |
---|---|---|
committer | Tom Willemsen | 2012-05-20 15:17:21 +0200 |
commit | 02ba70f3e3cd6f078d926848bf325e6860962cdb (patch) | |
tree | 441d305fb366a43546435aecb856fe9dcb445184 | |
parent | 629d48d6fb3a05e6e640e6941631cee8a3dea1a8 (diff) | |
download | git-auto-commit-mode-02ba70f3e3cd6f078d926848bf325e6860962cdb.tar.gz git-auto-commit-mode-02ba70f3e3cd6f078d926848bf325e6860962cdb.zip |
Show status at the end of the push
-rw-r--r-- | git-auto-commit-mode.el | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/git-auto-commit-mode.el b/git-auto-commit-mode.el index 2daad54..910609e 100644 --- a/git-auto-commit-mode.el +++ b/git-auto-commit-mode.el @@ -4,7 +4,7 @@ ;; Author: Tom Willemsen <tom@ryuslash.org> ;; Created: Jan 9, 2012 -;; Version: 2 +;; Version: 3 ;; Keywords: vc ;; URL: http://ryuslash.org/git-auto-commit-mode/ @@ -35,6 +35,8 @@ ;; 2 - Add ability to automatically push. +;; 3 - Shows the status when push finishes. + ;;; Code: (defvar gac-automatically-push nil @@ -75,6 +77,10 @@ user for one when it does." (let ((inhibit-read-only t)) (gac-password proc string)))) +(defun gac-process-sentinel (proc status) + "Report the process' status change." + (message "git %s" (substring status 0 -1))) + (defun gac-commit () "Commit `buffer-file-name' to git" (let* ((filename (buffer-file-name)) @@ -89,6 +95,7 @@ user for one when it does." doesn't check or ask for a remote, so the correct remote should already have been set up." (let ((proc (start-process "git" "*git-auto-push*" "git" "push"))) + (set-process-sentinel proc 'gac-process-sentinel) (set-process-filter proc 'gac-process-filter))) (defun gac-after-save-func () |