* [PATCH] vc-git.el: Switch to using git-blame instead of git-annotate.
@ 2006-10-05 9:30 Alexandre Julliard
2006-10-05 9:34 ` Junio C Hamano
0 siblings, 1 reply; 3+ messages in thread
From: Alexandre Julliard @ 2006-10-05 9:30 UTC (permalink / raw)
To: git
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
---
contrib/emacs/vc-git.el | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/contrib/emacs/vc-git.el b/contrib/emacs/vc-git.el
index 4a8f790..4189c4c 100644
--- a/contrib/emacs/vc-git.el
+++ b/contrib/emacs/vc-git.el
@@ -119,10 +119,10 @@ (defun vc-git-checkout (file &optional e
(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))))))
--
1.4.2.3.g1723
--
Alexandre Julliard
julliard@winehq.org
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] vc-git.el: Switch to using git-blame instead of git-annotate.
2006-10-05 9:30 [PATCH] vc-git.el: Switch to using git-blame instead of git-annotate Alexandre Julliard
@ 2006-10-05 9:34 ` Junio C Hamano
2006-10-05 9:52 ` Alexandre Julliard
0 siblings, 1 reply; 3+ messages in thread
From: Junio C Hamano @ 2006-10-05 9:34 UTC (permalink / raw)
To: Alexandre Julliard; +Cc: git
Alexandre Julliard <julliard@winehq.org> writes:
> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
> ---
> contrib/emacs/vc-git.el | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/contrib/emacs/vc-git.el b/contrib/emacs/vc-git.el
> index 4a8f790..4189c4c 100644
> --- a/contrib/emacs/vc-git.el
> +++ b/contrib/emacs/vc-git.el
> @@ -119,10 +119,10 @@ (defun vc-git-checkout (file &optional e
> (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)))
"blame -c" is advertised to give the same format as "annotate",
so I think you would not need other hunk if you did.
> (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))))))
Not that I am preferring the annotate output format over blame's
native output format. I just wanted to know if the reason you
did not do -c was because you tried and "blame -c" was not
compatible as advertised (in which case we have one more thing
to fix).
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] vc-git.el: Switch to using git-blame instead of git-annotate.
2006-10-05 9:34 ` Junio C Hamano
@ 2006-10-05 9:52 ` Alexandre Julliard
0 siblings, 0 replies; 3+ messages in thread
From: Alexandre Julliard @ 2006-10-05 9:52 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
Junio C Hamano <junkio@cox.net> writes:
> Not that I am preferring the annotate output format over blame's
> native output format. I just wanted to know if the reason you
> did not do -c was because you tried and "blame -c" was not
> compatible as advertised (in which case we have one more thing
> to fix).
As far as I can tell, "blame -c" works fine. I switched because I find
the default blame output nicer, it wastes less horizontal space and
the file contents are properly aligned.
--
Alexandre Julliard
julliard@winehq.org
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2006-10-05 9:53 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-05 9:30 [PATCH] vc-git.el: Switch to using git-blame instead of git-annotate Alexandre Julliard
2006-10-05 9:34 ` Junio C Hamano
2006-10-05 9:52 ` Alexandre Julliard
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).