git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Max Kirillov <max@max630.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: Max Kirillov <max@max630.net>, Jeff King <peff@peff.net>,
	Eric Sunshine <sunshine@sunshineco.com>,
	git@vger.kernel.org
Subject: Re: [PATCH v2 2/2] blame: allow blame --reverse --first-parent when it makes sense
Date: Thu, 22 Oct 2015 17:56:06 +0300	[thread overview]
Message-ID: <20151022145606.GD5722@wheezy.local> (raw)
In-Reply-To: <xmqqfv13ttq6.fsf@gitster.mtv.corp.google.com>

On Wed, Oct 21, 2015 at 09:25:37PM -0700, Junio C Hamano wrote:
> Max Kirillov <max@max630.net> writes:
> 
>> Do not die immediately when the two flags are specified. Instead
>> check that the specified range is along first-parent chain. Exploit
>> how prepare_revision_walk() handles first_parent_only flag: the commits
>> outside of first-parent chain are either unknown (and do not have any
>> children recorded) or appear as non-first parent of a commit along the
>> first-parent chain.
>>
>> Since the check seems fragile, add test which verifies that blame dies
>> in both cases.
> 
> It is not quite clear in what way the "check seems fragile".
> 
> It is either "correct" or "appears to have worked by chance and
> nobody has any confidence that it would tell if 'it makes sense'
> reliably", and the latter cannot be papered over with any number of
> tests.
> 
> The logic you implemented feels solid to me, at least at a first
> glance.  What kind of gotchas are you worried about?

The fact than arbitrary commit's children are unknown does
not seem reliable to me. It more fits the "works by chance"
description.

Actually, I realized that this can produce false positive if
the final commit is no-ff merged into first-parent chain,
because it woul be both first and non-first parent of the
first-parent chain.
But afaik such merge is not possible to create by frontent git
commands, so I'm not sure I should consider such case.

-- 
Max

  reply	other threads:[~2015-10-22 14:56 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-21  4:08 [PATCH 0/2] blame: allow blame --reverse --first-parent when it makes sense Max Kirillov
2015-10-21  4:08 ` [PATCH 1/2] Add test to describe expectation of blame --reverse with branched history Max Kirillov
2015-10-21  4:08 ` [PATCH 2/2] blame: allow blame --reverse --first-parent when it makes sense Max Kirillov
2015-10-21  4:29   ` Eric Sunshine
2015-10-22  3:52     ` Max Kirillov
2015-10-22  3:51 ` [PATCH v2 0/2] " Max Kirillov
2015-10-22  3:51   ` [PATCH v2 1/2] Add test to describe expectation of blame --reverse with branched history Max Kirillov
2015-10-22  4:19     ` Junio C Hamano
2015-10-22 14:37       ` Max Kirillov
2015-10-22 14:56         ` Max Kirillov
2015-10-22  3:51   ` [PATCH v2 2/2] blame: allow blame --reverse --first-parent when it makes sense Max Kirillov
2015-10-22  4:25     ` Junio C Hamano
2015-10-22 14:56       ` Max Kirillov [this message]
2015-10-22 19:11         ` Junio C Hamano
2015-10-25 12:43           ` Max Kirillov
2015-10-25 16:52             ` Junio C Hamano
2015-10-22  4:07   ` [PATCH v3 0/2] " Max Kirillov
2015-10-22  4:07     ` [PATCH v3 1/2] Add test to describe expectation of blame --reverse with branched history Max Kirillov
2015-10-22  4:07     ` [PATCH v3 2/2] blame: allow blame --reverse --first-parent when it makes sense Max Kirillov
2015-10-26  5:26     ` [PATCH v4 0/4] " Max Kirillov
2015-10-26  5:26       ` [PATCH v4 1/3] Add test to describe expectation of blame --reverse with branched history Max Kirillov
2015-10-26  5:41         ` Max Kirillov
2015-10-26  6:27         ` Junio C Hamano
2015-10-27  4:40           ` Max Kirillov
2015-10-27 17:57             ` Junio C Hamano
2015-10-26  5:26       ` [PATCH v4 2/3] blame: extract find_single_final Max Kirillov
2015-10-26  5:26       ` [PATCH v4 3/3] blame: allow blame --reverse --first-parent when it makes sense Max Kirillov
2015-10-30  5:01       ` [PATCH v5 0/3] " Max Kirillov
2015-10-30  5:01         ` [PATCH v5 1/3] blame: test to describe use of blame --reverse --first-parent Max Kirillov
2015-10-30 22:30           ` Junio C Hamano
2015-10-30  5:01         ` [PATCH v5 2/3] blame: extract find_single_final Max Kirillov
2015-10-30  5:01         ` [PATCH v5 3/3] blame: allow blame --reverse --first-parent when it makes sense Max Kirillov
2015-10-26  5:26     ` [PATCH v4 0/4] " Max Kirillov
2015-10-26  5:31       ` Max Kirillov

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=20151022145606.GD5722@wheezy.local \
    --to=max@max630.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=peff@peff.net \
    --cc=sunshine@sunshineco.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).