From: David Kastrup <dak@gnu.org>
To: git@vger.kernel.org
Subject: [PATCH] vc-git: support asynchronous annotations, and improve versioning.
Date: Mon, 16 Jul 2007 01:53:57 +0200 [thread overview]
Message-ID: <cfa5ed80635135dd7544f2b4c6df521a4353e90d.1184548803.git.dak@gnu.org> (raw)
In-Reply-To: <403842ba71506c7b194812cd9a4f669c847eb7bc.1184548803.git.dak@gnu.org>
(vc-git-symbolic-commit): Allow nil to pass through.
(vc-git-previous-version): Use explicit parent argument.
(vc-git-next-version): Simplify.
(vc-git-annotate-command): Use `vc-do-command'.
(vc-git-annotate-extract-revision-at-line): Rename from
`vc-annotate-extract-revision-at-line'.
(vc-git-checkout): Make nicer way of ensuring encoding.
Signed-off-by: David Kastrup <dak@gnu.org>
---
contrib/emacs/vc-git.el | 21 ++++++++++-----------
1 files changed, 10 insertions(+), 11 deletions(-)
diff --git a/contrib/emacs/vc-git.el b/contrib/emacs/vc-git.el
index 2a0a0fe..d7ad314 100644
--- a/contrib/emacs/vc-git.el
+++ b/contrib/emacs/vc-git.el
@@ -173,23 +173,22 @@ Returns nil if not possible."
(let ((fullname (substring
(vc-git--run-command-string file "ls-files" "-z" "--full-name" "--")
0 -1))
- (coding-system-for-read 'no-conversion)
- coding-system-for-write)
+ (coding-system-for-read 'no-conversion))
(with-temp-file destfile
- (prog1
- (eq 0 (call-process "git" nil t nil "cat-file" "blob"
- (concat (or rev "HEAD") ":" fullname)))
- (setq coding-system-for-write 'no-conversion))))
+ (setq buffer-file-coding-system 'no-conversion)
+ (eq 0 (call-process "git" nil t nil "cat-file" "blob"
+ (concat (or rev "HEAD") ":" fullname)))))
(vc-git--run-command file "checkout" (or rev "HEAD"))))
(defun vc-git-annotate-command (file buffer &optional version)
"Execute \"git blame\" on FILE, inserting the contents in BUFFER.
Optional arg VERSION is a version to annotate from."
- (vc-do-command buffer
- 'async
- "git" file "blame"
- (or version "HEAD")
- "--"))
+ (let ((coding-system-for-read git-commits-coding-system))
+ (vc-do-command buffer
+ 'async
+ "git" file "blame"
+ (or version "HEAD")
+ "--")))
;;(defun vc-git-annotate-command (file buf &optional rev)
;; (let ((name (file-relative-name file)))
--
1.4.4.2
next prev parent reply other threads:[~2007-07-16 1:40 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-16 1:24 [PATCH] contrib/emacs/vc-git.el: various improvements David Kastrup
2007-07-15 9:46 ` [PATCH] contrib/emacs/Makefile: Also install .el files David Kastrup
2007-07-16 1:27 ` [PATCH] contrib/emacs David Kastrup
2007-07-16 3:20 ` [PATCH] contrib/emacs/Makefile: Also install .el files Junio C Hamano
2007-07-15 23:42 ` [PATCH] Make several improvements and get annotations to work (Emacs support pending) David Kastrup
2007-07-15 23:53 ` David Kastrup [this message]
2007-07-16 3:20 ` [PATCH] vc-git: support asynchronous annotations, and improve versioning Junio C Hamano
2007-07-16 5:29 ` David Kastrup
2007-07-16 6:14 ` Junio C Hamano
2007-07-16 0:05 ` [PATCH] (vc-git-annotate-command): Make synchronous for now David Kastrup
2007-07-16 3:20 ` [PATCH] contrib/emacs/vc-git.el: various improvements Junio C Hamano
2007-07-16 5:26 ` David Kastrup
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cfa5ed80635135dd7544f2b4c6df521a4353e90d.1184548803.git.dak@gnu.org \
--to=dak@gnu.org \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).