git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Raymond E. Pasco" <ray@ameretat.dev>
To: "Noam Soloveichik" <inoamsol@gmail.com>,
	"Junio C Hamano" <gitster@pobox.com>
Cc: <git@vger.kernel.org>
Subject: Re: Why is AuthorDate displayed on git-blame?
Date: Thu, 06 Aug 2020 14:13:55 -0400	[thread overview]
Message-ID: <C4Q493FC0N34.3GA87TXK6SJPJ@ziyou> (raw)
In-Reply-To: <6dabe718-6d6e-e76c-677d-f2dc4a5b83be@gmail.com>

On Thu Aug 6, 2020 at 11:19 AM EDT, Noam Soloveichik wrote:
> I want to make sure I understand your proposal correctly -
> --first-parent would still show AuthorDate, but of the
> *merge-commit*, and not the commit that introduced the line of code
> to the history overall.

To be clear, I'm not proposing anything but surfacing a useful feature
that already exists in the documentation.

> If so, it's going to get the job done for commits which are applied
> by a merge-commit. Although I wonder what --first-parent would
> display for commits which are applied *not* by a merge.

--first-parent commands don't care about merges, except that they never
follow the second or later parents of a merge. blame just tries to find
the earliest commit that had this version of some line in it; if it only
follows first parents then that will often end up being a merge (if
you're on an integration branch) but doesn't have to be.

> Consider the linux kernel, where some of its commits are merge
> commits from pull requests, and some are applied patches: with
> different AuthorDate and CommitDate. For those commits, AuthorDate
> represents the date the patch was originally sent to review, not when
> it was introduced to the integration branch, which is represented by
> the CommitDate, which leads to inconsistencies.

I honestly don't make use of dates in my workflow at all, so I don't
really have an opinion on date issues. The author date is marginally
more interesting to me, but only marginally and only really in projects
that use email (where the author date "git am" records is the date on
the email the patch came in).

Of course an option to choose which author/date pair (author or
committer) to annotate the file with would be a fine addition benefiting
people who do look at the dates. I use first-parent histories all the
time, however, and I'd like to see this useful existing blame option
documented.

  reply	other threads:[~2020-08-06 18:37 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-05  0:18 Why is AuthorDate displayed on git-blame? נעם סולוביצ'יק
2020-08-05  0:40 ` Junio C Hamano
2020-08-06  6:57   ` Raymond E. Pasco
2020-08-06 15:19     ` Noam Soloveichik
2020-08-06 18:13       ` Raymond E. Pasco [this message]
2020-08-06 18:17     ` Junio C Hamano
2020-08-06 18:52       ` [PATCH] blame-options.txt: document --first-parent option Raymond E. Pasco
2020-08-08  0:35       ` Why is AuthorDate displayed on git-blame? Jeff King
2020-08-05  1:59 ` brian m. carlson
2020-08-05 16:08   ` Junio C Hamano

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=C4Q493FC0N34.3GA87TXK6SJPJ@ziyou \
    --to=ray@ameretat.dev \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=inoamsol@gmail.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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).