diff lisp/vc-git.el @ 78359:2dd5d799a16d

* vc-git.el: (vc-directory-exclusion-list, vc-handled-backends): Remove. (vc-git-revision-completion-table): Enable. * vc-hooks.el (vc-handled-backends): Add GIT and HG. * vc.el (vc-directory-exclusion-list): Add .git and .hg. * vc-hg.el (vc-hg-revision-completion-table): Re-enable. * diff-mode.el (diff-mode-menu): New entries. * diff-mode.el (diff-beginning-of-file-and-junk): New function. (diff-file-kill): Use it. (diff-beginning-of-hunk): Add arg `try-harder' using it. (diff-restrict-view, diff-find-source-location, diff-refine-hunk): Use it so they find the hunk even when we're in the file header. * vc.el: Add new VC operation `revision-completion-table'. (vc-default-revision-completion-table): New function. (vc-version-diff, vc-version-other-window): Use it to provide completion of revision names if the backend provides it. * vc-arch.el (vc-arch--version-completion-table) (vc-arch-revision-completion-table): New functions to provide completion of revision names. * vc-cvs.el: Require CL. (vc-cvs-revision-table, vc-cvs-revision-completion-table): New functions to provide completion of revision names. * eval.c (init_eval_once): Bump max_lisp_eval_depth to 400. * vc2-xtra.texi (Customizing VC): Add GIT and HG.
author Dan Nicolaescu <dann@ics.uci.edu>
date Mon, 30 Jul 2007 00:19:06 +0000
parents dc356155b0a7
children 27f00e50116a
line wrap: on
line diff
--- a/lisp/vc-git.el	Sun Jul 29 20:11:25 2007 +0000
+++ b/lisp/vc-git.el	Mon Jul 30 00:19:06 2007 +0000
@@ -111,13 +111,6 @@
 
 (eval-when-compile (require 'cl) (require 'vc))
 
-;; XXX when this backend is considered sufficiently reliable this
-;; should be moved to vc-hooks.el
-(add-to-list 'vc-handled-backends 'GIT)
-(eval-after-load "vc"
-  '(add-to-list 'vc-directory-exclusion-list ".git" t))
-
-
 (defvar git-commits-coding-system 'utf-8
   "Default coding system for git commits.")
 
@@ -331,14 +324,12 @@
         (push (match-string 2) table)))
     table))
 
-;; Commented out on the 22.x branch, VC here does not support it yet
-;; and when bytecompiling it max-specpdl-size is exceeded.
-;; (defun vc-git-revision-completion-table (file)
-;;   (lexical-let ((file file)
-;;                 table)
-;;     (setq table (lazy-completion-table
-;;                  table (lambda () (vc-git-revision-table file))))
-;;     table))
+(defun vc-git-revision-completion-table (file)
+  (lexical-let ((file file)
+                table)
+    (setq table (lazy-completion-table
+                 table (lambda () (vc-git-revision-table file))))
+    table))
 
 (defun vc-git-diff-tree (dir &optional rev1 rev2)
   (vc-git-diff dir rev1 rev2))