summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 04d70be)
raw | patch | inline | side by side (parent: 04d70be)
author | Alexandre Julliard <julliard@winehq.org> | |
Sat, 11 Aug 2007 10:22:47 +0000 (12:22 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Mon, 13 Aug 2007 19:58:38 +0000 (12:58 -0700) |
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
contrib/emacs/git.el | patch | blob | history |
diff --git a/contrib/emacs/git.el b/contrib/emacs/git.el
index f6102fc344a62982b2ed489e0c077852b8b6ccca..214b75cf93fa0375f99350c54b115a85442a310c 100644 (file)
--- a/contrib/emacs/git.el
+++ b/contrib/emacs/git.el
(defun git-diff-file-idiff ()
"Perform an interactive diff on the current file."
(interactive)
- (error "Interactive diffs not implemented yet."))
+ (let ((files (git-marked-files-state 'added 'deleted 'modified)))
+ (unless (eq 1 (length files))
+ (error "Cannot perform an interactive diff on multiple files."))
+ (let* ((filename (car (git-get-filenames files)))
+ (buff1 (find-file-noselect filename))
+ (buff2 (git-run-command-buffer (concat filename ".~HEAD~") "cat-file" "blob" (concat "HEAD:" filename))))
+ (ediff-buffers buff1 buff2))))
(defun git-log-file ()
"Display a log of changes to the marked file(s)."