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

Re: Why is AuthorDate displayed on git-blame?

From
brian m. carlson <sandals@crustytoothpaste.net>
Date
Aug 5, 2020, 01:59 UTC
Message-ID
<20200805015939.GQ6540@camp.crustytoothpaste.net>
In-Reply-To
<CAAWR3A9po-zMVFdQfDs6R5F_rf0UvSyfByLj-vYZiXLb8+j4Ug@mail.gmail.com>
On 2020-08-05 at 00:18:43, נעם סולוביצ'יק wrote:
Show 18 quoted lines
> Hey everybody, I wonder about the decision behind git-blame and
> git-annotate date that is being shown.
> 
> If I understand correctly, the AuthorDate is displayed, and I'd like
> to challenge that decision. Consider the following case:
> 
> A feature branch having commits authored last week, but merged to the
> main branch just today. And to the sake of discussion, let's say that
> the branch has a bug.
> 
> When someone encounters the bug on the main branch, he would probably
> want to know when it was introduced - the date when the bug started
> to affect him. However, git-blame only shows him when the bug was
> originally authored, in our case - *last-week*, which is confusing
> since the main branch was working just fine back then.
> 
> So I wonder why was AuthorDate the date chosen to be displayed under
> git-blame?

I can't speak for the original author of this, and I think Junio's answer explains this well, but I'd like to add an additional thought on why the current behavior is useful.

For me, I am primarily interested in using blame to find information about the party most knowledgable about the subsystem or area, or to find a commit that introduced a change (possibly so I can read its commit message or pull request). I'm less likely to use blame to, well, blame people. Consequently, it's often helpful for me to know about when the code was written, since that tells me more about the author and their situation than the committer information does.

For a project like Git, the committer information would not be very interesting to me, since Junio, while very competent, is not the expert for every line in the codebase. Since we're displaying the author name, we might as well display the author timestamp as well.

I'm in favor of an option for this, though.
-- 
brian m. carlson: Houston, Texas, US
Previous: Jeff KingNext: Junio C Hamano
Message 9 of 10 in “Why is AuthorDate displayed on git-blame?”
  1. נעם סולוביצ'יקAug 5, 2020
  2. Junio C HamanoAug 5, 2020
  3. Raymond E. PascoAug 6, 2020
  4. Noam SoloveichikAug 6, 2020
  5. Raymond E. PascoAug 6, 2020
  6. Junio C HamanoAug 6, 2020
  7. blame-options.txt: document --first-parent optionRaymond E. Pasco, Aug 6, 2020
  8. Jeff KingAug 8, 2020
  9. brian m. carlsonAug 5, 2020
  10. Junio C HamanoAug 5, 2020

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.