summaryrefslogtreecommitdiff
path: root/contrib/emacs/vc-git.el
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2006-10-23 20:53:38 -0700
committerJunio C Hamano <junkio@cox.net>2006-10-23 20:53:38 -0700
commitccbb3d17ace70be9d986368d3df795f5961e9683 (patch)
tree4f00d6182f6a42bdd93775c8fabb0d205f24a406 /contrib/emacs/vc-git.el
parent63e02a1be308aa57f3cabd7e951a94ac3b7aeb51 (diff)
parent1259404c7e5cd88b7f6692986469cd20cbfacdad (diff)
downloadgit-ccbb3d17ace70be9d986368d3df795f5961e9683.tar.gz
Merge branch 'master' into jc/web
* master: (114 commits) gitweb: Fix setting $/ in parse_commit() daemon: do not die on older clients. xdiff/xemit.c (xdl_find_func): Elide trailing white space in a context header. git-clone: honor --quiet Documentation for the [remote] config prune-packed: Fix uninitialized variable. ignore-errors requires cl git-send-email: do not pass custom Date: header Use column indexes in git-cvsserver where necessary. gitweb: Add '..' (up directory) to tree view if applicable gitweb: Improve git_print_page_path pager: default to LESS=FRSX not LESS=FRS Make prune also run prune-packed git-vc: better installation instructions gitweb: Do not esc_html $basedir argument to git_print_tree_entry gitweb: Whitespace cleanup - tabs are for indent, spaces are for align (2) Fix usagestring for git-branch git-merge: show usage if run without arguments add the capability for index-pack to read from a stream git-clone: define die() and use it. ...
Diffstat (limited to 'contrib/emacs/vc-git.el')
-rw-r--r--contrib/emacs/vc-git.el11
1 files changed, 8 insertions, 3 deletions
diff --git a/contrib/emacs/vc-git.el b/contrib/emacs/vc-git.el
index 4a8f79092d..8b6361922f 100644
--- a/contrib/emacs/vc-git.el
+++ b/contrib/emacs/vc-git.el
@@ -23,13 +23,18 @@
;; system.
;;
;; To install: put this file on the load-path and add GIT to the list
-;; of supported backends in `vc-handled-backends'.
+;; of supported backends in `vc-handled-backends'; the following line,
+;; placed in your ~/.emacs, will accomplish this:
+;;
+;; (add-to-list 'vc-handled-backends 'GIT)
;;
;; TODO
;; - changelog generation
;; - working with revisions other than HEAD
;;
+(eval-when-compile (require 'cl))
+
(defvar git-commits-coding-system 'utf-8
"Default coding system for git commits.")
@@ -119,10 +124,10 @@
(defun vc-git-annotate-command (file buf &optional rev)
; FIXME: rev is ignored
(let ((name (file-relative-name file)))
- (call-process "git" nil buf nil "annotate" name)))
+ (call-process "git" nil buf nil "blame" name)))
(defun vc-git-annotate-time ()
- (and (re-search-forward "[0-9a-f]+\t(.*\t\\([0-9]+\\)-\\([0-9]+\\)-\\([0-9]+\\) \\([0-9]+\\):\\([0-9]+\\):\\([0-9]+\\) \\([-+0-9]+\\)\t[0-9]+)" nil t)
+ (and (re-search-forward "[0-9a-f]+ (.* \\([0-9]+\\)-\\([0-9]+\\)-\\([0-9]+\\) \\([0-9]+\\):\\([0-9]+\\):\\([0-9]+\\) \\([-+0-9]+\\) +[0-9]+)" nil t)
(vc-annotate-convert-time
(apply #'encode-time (mapcar (lambda (match) (string-to-number (match-string match))) '(6 5 4 3 2 1 7))))))