comparison lisp/vc-git.el @ 106974:1c559638a806

Remove support for adding --signoff on commit. Future support will use an incompatible generic mechanism. * vc-git.el (vc-git-add-signoff): Remove variable. (vc-git-toggle-signoff): Remove function. (vc-git-extra-menu-map): Do not bind vc-git-toggle-signoff.
author Dan Nicolaescu <dann@ics.uci.edu>
date Sun, 24 Jan 2010 13:23:17 -0800
parents 1d1d5d9bd884
children 36d87e3f3cc3
comparison
equal deleted inserted replaced
106973:9b98e092d459 106974:1c559638a806
116 (string :tag "Argument String") 116 (string :tag "Argument String")
117 (repeat :tag "Argument List" :value ("") string)) 117 (repeat :tag "Argument List" :value ("") string))
118 :version "23.1" 118 :version "23.1"
119 :group 'vc) 119 :group 'vc)
120 120
121 (defcustom vc-git-add-signoff nil
122 "Add a Signed-off-by line when committing."
123 :type 'boolean
124 :version "23.2"
125 :group 'vc)
126
127
128 (defvar git-commits-coding-system 'utf-8 121 (defvar git-commits-coding-system 'utf-8
129 "Default coding system for git commits.") 122 "Default coding system for git commits.")
130 123
131 ;;; BACKEND PROPERTIES 124 ;;; BACKEND PROPERTIES
132 125
513 506
514 507
515 (defun vc-git-checkin (files rev comment) 508 (defun vc-git-checkin (files rev comment)
516 (let ((coding-system-for-write git-commits-coding-system)) 509 (let ((coding-system-for-write git-commits-coding-system))
517 (vc-git-command nil 0 files "commit" 510 (vc-git-command nil 0 files "commit"
518 (if vc-git-add-signoff "-s") "-m" comment "--only" "--"))) 511 "-m" comment "--only" "--")))
519 512
520 (defun vc-git-find-revision (file rev buffer) 513 (defun vc-git-find-revision (file rev buffer)
521 (let* (process-file-side-effects 514 (let* (process-file-side-effects
522 (coding-system-for-read 'binary) 515 (coding-system-for-read 'binary)
523 (coding-system-for-write 'binary) 516 (coding-system-for-write 'binary)
764 '(menu-item "Create Stash..." vc-git-stash 757 '(menu-item "Create Stash..." vc-git-stash
765 :help "Stash away changes")) 758 :help "Stash away changes"))
766 (define-key map [git-ss] 759 (define-key map [git-ss]
767 '(menu-item "Show Stash..." vc-git-stash-show 760 '(menu-item "Show Stash..." vc-git-stash-show
768 :help "Show stash contents")) 761 :help "Show stash contents"))
769 (define-key map [git-sig]
770 '(menu-item "Add Signed-off-by on commit" vc-git-toggle-signoff
771 :help "Add Add Signed-off-by when commiting (i.e. add the -s flag)"
772 :button (:toggle . vc-git-add-signoff)))
773 map)) 762 map))
774 763
775 (defun vc-git-extra-menu () vc-git-extra-menu-map) 764 (defun vc-git-extra-menu () vc-git-extra-menu-map)
776 765
777 (defun vc-git-extra-status-menu () vc-git-extra-menu-map) 766 (defun vc-git-extra-status-menu () vc-git-extra-menu-map)
778 767
779 (defun vc-git-root (file) 768 (defun vc-git-root (file)
780 (vc-find-root file ".git")) 769 (vc-find-root file ".git"))
781
782 (defun vc-git-toggle-signoff ()
783 (interactive)
784 (setq vc-git-add-signoff (not vc-git-add-signoff)))
785 770
786 ;; Derived from `lgrep'. 771 ;; Derived from `lgrep'.
787 (defun vc-git-grep (regexp &optional files dir) 772 (defun vc-git-grep (regexp &optional files dir)
788 "Run git grep, searching for REGEXP in FILES in directory DIR. 773 "Run git grep, searching for REGEXP in FILES in directory DIR.
789 The search is limited to file names matching shell pattern FILES. 774 The search is limited to file names matching shell pattern FILES.