[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs/lisp ChangeLog vc-git.el
From: |
Dan Nicolaescu |
Subject: |
[Emacs-diffs] emacs/lisp ChangeLog vc-git.el |
Date: |
Thu, 23 Jul 2009 05:17:30 +0000 |
CVSROOT: /cvsroot/emacs
Module name: emacs
Changes by: Dan Nicolaescu <dann> 09/07/23 05:17:30
Modified files:
lisp : ChangeLog vc-git.el
Log message:
(vc-git-add-signoff): New variable.
(vc-git-checkin): Use it.
(vc-git-toggle-signoff): New function.
(vc-git-extra-menu-map): Bind it to menu.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/ChangeLog?cvsroot=emacs&r1=1.15849&r2=1.15850
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/vc-git.el?cvsroot=emacs&r1=1.82&r2=1.83
Patches:
Index: ChangeLog
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/ChangeLog,v
retrieving revision 1.15849
retrieving revision 1.15850
diff -u -b -r1.15849 -r1.15850
--- ChangeLog 23 Jul 2009 02:55:34 -0000 1.15849
+++ ChangeLog 23 Jul 2009 05:17:27 -0000 1.15850
@@ -1,3 +1,10 @@
+2009-07-22 Dan Nicolaescu <address@hidden>
+
+ * vc-git.el (vc-git-add-signoff): New variable.
+ (vc-git-checkin): Use it.
+ (vc-git-toggle-signoff): New function.
+ (vc-git-extra-menu-map): Bind it to menu.
+
2009-07-23 Glenn Morris <address@hidden>
* help-fns.el (describe-variable): Describe ignored and risky local
Index: vc-git.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/vc-git.el,v
retrieving revision 1.82
retrieving revision 1.83
diff -u -b -r1.82 -r1.83
--- vc-git.el 26 Jun 2009 23:54:00 -0000 1.82
+++ vc-git.el 23 Jul 2009 05:17:30 -0000 1.83
@@ -118,6 +118,13 @@
:version "23.1"
:group 'vc)
+(defcustom vc-git-add-signoff nil
+ "Add a Signed-off-by line when committing."
+ :type 'boolean
+ :version "23.2"
+ :group 'vc)
+
+
(defvar git-commits-coding-system 'utf-8
"Default coding system for git commits.")
@@ -420,7 +427,8 @@
(defun vc-git-checkin (files rev comment)
(let ((coding-system-for-write git-commits-coding-system))
- (vc-git-command nil 0 files "commit" "-m" comment "--only" "--")))
+ (vc-git-command nil 0 files "commit"
+ (if vc-git-add-signoff "-s" "") "-m" comment "--only"
"--")))
(defun vc-git-find-revision (file rev buffer)
(let ((coding-system-for-read 'binary)
@@ -633,12 +641,20 @@
(define-key map [git-grep]
'(menu-item "Git grep..." vc-git-grep
:help "Run the `git grep' command"))
+ (define-key map [git-sig]
+ '(menu-item "Add Signed-off-by on commit" vc-git-toggle-signoff
+ :help "Add Add Signed-off-by when commiting (i.e. add the -s
flag)"
+ :button (:toggle . vc-git-add-signoff)))
map))
(defun vc-git-extra-menu () vc-git-extra-menu-map)
(defun vc-git-extra-status-menu () vc-git-extra-menu-map)
+(defun vc-git-toggle-signoff ()
+ (interactive)
+ (setq vc-git-add-signoff (not vc-git-add-signoff)))
+
;; Derived from `lgrep'.
(defun vc-git-grep (regexp &optional files dir)
"Run git grep, searching for REGEXP in FILES in directory DIR.
- [Emacs-diffs] emacs/lisp ChangeLog vc-git.el,
Dan Nicolaescu <=