git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] Automatically add GIT as a VC backend

From
XMXavier Maillard <zedek@gnu.org>
Date
Mar 1, 2007, 23:52 UTC
Message-ID
<28587.1172793178@localhost>
Hi,
A small patch with following changes:
Automatically add GIT as a VC backend
Remove byte-compiler warning with an eval of vc
---
 contrib/emacs/vc-git.el |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/contrib/emacs/vc-git.el b/contrib/emacs/vc-git.el
index e456ab9..a2d3932 100644
--- a/contrib/emacs/vc-git.el
+++ b/contrib/emacs/vc-git.el
@@ -22,18 +22,19 @@
 ;; This file contains a VC backend for the git version control
 ;; system.
 ;;
-;; To install: put this file on the load-path and add GIT to the list
-;; of supported backends in `vc-handled-backends'; the following line,
-;; placed in your ~/.emacs, will accomplish this:
-;;
-;;     (add-to-list 'vc-handled-backends 'GIT)
+;; To install: put this file on the load-path.
 ;;
 ;; TODO
 ;;  - changelog generation
 ;;  - working with revisions other than HEAD
 ;;
 
-(eval-when-compile (require 'cl))
+(eval-when-compile 
+  (require 'cl)
+  (require 'vc))
+
+;; Add it automatically
+(add-to-list 'vc-handled-backends 'GIT)
 
 (defvar git-commits-coding-system 'utf-8
   "Default coding system for git commits.")
-- 
Xavier
Next: Alexandre Julliard
Message 1 of 3 in “Automatically add GIT as a VC backend”
  1. Automatically add GIT as a VC backendXavier Maillard, Mar 1, 2007
  2. Alexandre JulliardMar 2, 2007
  3. Xavier MaillardMar 3, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.