comparison lisp/vc-git.el @ 94563:a0bb8ca25a33

Clean up vc*-revision-granularity and vc*-checkout-model.
author Eric S. Raymond <esr@snark.thyrsus.com>
date Fri, 02 May 2008 17:47:25 +0000
parents fee32a11924d
children 3bdffe280ad3
comparison
equal deleted inserted replaced
94562:46f178f2b009 94563:a0bb8ca25a33
53 ;; * state (file) OK 53 ;; * state (file) OK
54 ;; - state-heuristic (file) NOT NEEDED 54 ;; - state-heuristic (file) NOT NEEDED
55 ;; - dir-state (dir) OK 55 ;; - dir-state (dir) OK
56 ;; * working-revision (file) OK 56 ;; * working-revision (file) OK
57 ;; - latest-on-branch-p (file) NOT NEEDED 57 ;; - latest-on-branch-p (file) NOT NEEDED
58 ;; * checkout-model (file) OK 58 ;; * checkout-model (files) OK
59 ;; - workfile-unchanged-p (file) OK 59 ;; - workfile-unchanged-p (file) OK
60 ;; - mode-line-string (file) OK 60 ;; - mode-line-string (file) OK
61 ;; - prettify-state-info (file) OK 61 ;; - prettify-state-info (file) OK
62 ;; STATE-CHANGING FUNCTIONS 62 ;; STATE-CHANGING FUNCTIONS
63 ;; * create-repo () OK 63 ;; * create-repo () OK
116 (defvar git-commits-coding-system 'utf-8 116 (defvar git-commits-coding-system 'utf-8
117 "Default coding system for git commits.") 117 "Default coding system for git commits.")
118 118
119 ;;; BACKEND PROPERTIES 119 ;;; BACKEND PROPERTIES
120 120
121 (defun vc-git-revision-granularity () 121 (defun vc-git-revision-granularity () 'repository)
122 'repository) 122 (defun vc-git-checkout-model (files) 'implicit)
123 123
124 ;;; STATE-QUERYING FUNCTIONS 124 ;;; STATE-QUERYING FUNCTIONS
125 125
126 ;;;###autoload (defun vc-git-registered (file) 126 ;;;###autoload (defun vc-git-registered (file)
127 ;;;###autoload "Return non-nil if FILE is registered with git." 127 ;;;###autoload "Return non-nil if FILE is registered with git."
192 (with-current-buffer standard-output 192 (with-current-buffer standard-output
193 (vc-git--out-ok "symbolic-ref" "HEAD"))))) 193 (vc-git--out-ok "symbolic-ref" "HEAD")))))
194 (if (string-match "^\\(refs/heads/\\)?\\(.+\\)$" str) 194 (if (string-match "^\\(refs/heads/\\)?\\(.+\\)$" str)
195 (match-string 2 str) 195 (match-string 2 str)
196 str))) 196 str)))
197
198 (defun vc-git-checkout-model (files) 'implicit)
199 197
200 (defun vc-git-workfile-unchanged-p (file) 198 (defun vc-git-workfile-unchanged-p (file)
201 (eq 'up-to-date (vc-git-state file))) 199 (eq 'up-to-date (vc-git-state file)))
202 200
203 (defun vc-git-mode-line-string (file) 201 (defun vc-git-mode-line-string (file)