From: Junio C Hamano <gitster@pobox.com>
To: "Jonathan del Strother" <maillist@steelskies.com>
Cc: "Git Mailing List" <git@vger.kernel.org>
Subject: Re: blame vs annotate?
Date: Wed, 03 Sep 2008 11:10:41 -0700 [thread overview]
Message-ID: <7v8wu9cd7i.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <57518fd10809030943i35af222fw82cf591c737b8c04@mail.gmail.com> (Jonathan del Strother's message of "Wed, 3 Sep 2008 17:43:03 +0100")
"Jonathan del Strother" <maillist@steelskies.com> writes:
> What's the difference between 'git blame' & 'git annotate'? The
> output is practically identical - it's not obvious when you would use
> one over the other
In short, don't use git-annotate unless you are an ancient script that was
written before git-blame was written. They are functionally equivalent,
uses the same blame assigning engine, and the only difference is the
default output format, and blame knows how to mimick annotate output.
History.
The first implementation was called git-annotate that was implemented in
Perl.
c65e898 (Add git-annotate, a tool for assigning blame., 2006-02-20)
A competing implementation in C was done and was called git-blame:
cbfb73d (Add git-blame, a tool for assigning blame., 2006-02-21)
They competed for a while but it became more and more apparent that blame
was a better implementation. After blame learned to mimick annotate
output, which some scripts depended on, Perl implementation was retired,
but the name git-annotate was left as a backward compatibility alias:
f789e34 (Remove git-annotate.perl and create a builtin-alias for git-blame, 2006-10-09)
Then as an experiment, a reimplementation of blame in C, confusingly
codenamed git-pickaxe, was started, to detect code movements across and
within files:
cee7f24 (git-pickaxe: blame rewritten., 2006-10-19)
This had the same output format as git-blame, also with compatibility
output format implemented for the older git-annotate. After it matured,
it took over the original git-blame name.
acca687 (git-pickaxe: retire pickaxe, 2006-11-08)
next prev parent reply other threads:[~2008-09-03 18:11 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-03 16:43 blame vs annotate? Jonathan del Strother
2008-09-03 17:49 ` Miklos Vajna
2008-09-03 17:54 ` Petr Baudis
2008-09-03 18:10 ` Junio C Hamano [this message]
2008-09-04 9:09 ` Matthieu Moy
2008-09-04 9:16 ` Sverre Rabbelier
2008-09-04 12:00 ` [PATCH] Mention the fact that 'git annotate' is only for backward compatibility Matthieu Moy
2008-09-04 12:30 ` Petr Baudis
2008-09-04 13:03 ` Matthieu Moy
2008-09-04 19:12 ` Junio C Hamano
2008-09-04 19:17 ` Junio C Hamano
2008-09-05 6:31 ` Matthieu Moy
2008-09-05 7:29 ` Junio C Hamano
2008-09-05 8:07 ` Petr Baudis
2008-09-05 12:06 ` Matthieu Moy
2008-09-05 7:56 ` Junio C Hamano
2008-09-03 18:11 ` blame vs annotate? Jakub Narebski
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=7v8wu9cd7i.fsf@gitster.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=maillist@steelskies.com \
/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).