git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: blame vs annotate?

From
Matthieu Moy <matthieu.moy@imag.fr>
Date
Sep 4, 2008, 09:09 UTC
Message-ID
<vpq7i9smg5e.fsf@bauges.imag.fr>
In-Reply-To
<7v8wu9cd7i.fsf@gitster.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> writes:
Show 10 quoted lines
> "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.
Then, does it make sense to apply this?
--- a/Documentation/git-annotate.txt
+++ b/Documentation/git-annotate.txt
@@ -14,6 +14,10 @@ DESCRIPTION
 Annotates each line in the given file with information from the commit
 which introduced the line. Optionally annotate from a given revision.
 
+This command exists for backward compatibility. If you don't have
+existing scripts using 'git annotate', you should use
+linkgit:git-blame[1] instead.
+
 OPTIONS
 -------
 include::blame-options.txt[]
-- 
Matthieu
Previous: Junio C HamanoNext: Sverre Rabbelier
Message 5 of 17 in “blame vs annotate?”
  1. Jonathan del StrotherSep 3, 2008
  2. Miklos VajnaSep 3, 2008
  3. Petr BaudisSep 3, 2008
  4. Junio C HamanoSep 3, 2008
  5. Matthieu MoySep 4, 2008
  6. Sverre RabbelierSep 4, 2008
  7. Mention the fact that 'git annotate' is only for backward compatibility.Matthieu Moy, Sep 4, 2008
  8. Petr BaudisSep 4, 2008
  9. Mention the fact that 'git annotate' is only for backward compatibility.Matthieu Moy, Sep 4, 2008
  10. Junio C HamanoSep 4, 2008
  11. Junio C HamanoSep 4, 2008
  12. Matthieu MoySep 5, 2008
  13. Junio C HamanoSep 5, 2008
  14. Petr BaudisSep 5, 2008
  15. Matthieu MoySep 5, 2008
  16. Junio C HamanoSep 5, 2008
  17. Jakub NarebskiSep 3, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.