git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Thomas Rast <trast@inf.ethz.ch>
To: Junio C Hamano <gitster@pobox.com>
Cc: Thomas Rast <trast@student.ethz.ch>, <git@vger.kernel.org>,
	Bo Yang <struggleyb.nku@gmail.com>
Subject: Re: [PATCH v7 0/5] git log -L, all new and shiny
Date: Tue, 19 Jun 2012 12:11:42 +0200	[thread overview]
Message-ID: <87wr33wqzl.fsf@thomas.inf.ethz.ch> (raw)
In-Reply-To: <7v1ulf94nq.fsf@alter.siamese.dyndns.org> (Junio C. Hamano's message of "Fri, 15 Jun 2012 23:01:13 -0700")

Junio C Hamano <gitster@pobox.com> writes:

> Junio C Hamano <gitster@pobox.com> writes:
>
>> Thomas Rast <trast@student.ethz.ch> writes:
>>
>>> This would be the first backwards coupling between the revision-walk and
>>> the diff generation parts, at least that I know of.
>>
>> I am not convinced if you need to have any unusual back-coupling to
>> begin with, by the way.
>>
>> If you say "git log -p [--options] -- pathspec", the revision
>> machinery does filter commits that do not touch any paths that patch
>> pathspec with the TREESAME logic, but that does not necessarily mean
>> you will see _all_ the commits that are not TREESAME.
[...]
> The revision machinery looks at C and finds its parent B.  It runs
> object level tree comparison and finds that their trees are
> different at path F.  It makes a mental note that it may need to
> show the log message of C, and asks the diff machinery to run
> diff-tree between B and C.  The diff machinery finds that it needs
> to show something even in the presense of -w option by actual
> comparison, and just before showing the very first line of patch
> output, it shows the log message of C (due to the earlier "mental
> note").
>
> Then the revision machinery looks at B.  It does the same between B
> and A, but this time around, the diff machinery finds that, even
> though A and B were _not_ TREESAME at the revision traversal level,
> there is nothing to be shown after filtering with the -w option.
> Hence no patch is shown and log message for B is not shown, either.

Thanks for the great explanations.

Having spent some time letting this sink in (and being busy doing other
things), I think it's actually a good idea.  It forces us to go back and
change it around so that the diff machinery gets a say _before_ we
simplify history.  I think this bit will be important for log -L history
to make sense, and it's a bug waiting to happen for the -w case.

-- 
Thomas Rast
trast@{inf,student}.ethz.ch

  reply	other threads:[~2012-06-19 10:11 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-07 10:23 [PATCH v7 0/5] git log -L, all new and shiny Thomas Rast
2012-06-07 10:23 ` [PATCH v7 1/5] Refactor parse_loc Thomas Rast
2012-06-07 10:23 ` [PATCH v7 2/5] blame: introduce $ as "end of file" in -L syntax Thomas Rast
2012-06-07 17:23   ` Junio C Hamano
2012-06-07 17:44     ` Thomas Rast
2012-06-07 10:23 ` [PATCH v7 3/5] Export three functions from diff.c Thomas Rast
2012-06-07 17:44   ` Junio C Hamano
2012-06-07 10:23 ` [PATCH v7 4/5] Export rewrite_parents() for 'log -L' Thomas Rast
2012-06-07 10:23 ` [PATCH v7 5/5] Implement line-history search (git log -L) Thomas Rast
2012-06-07 17:42   ` Junio C Hamano
2012-06-07 17:52     ` Thomas Rast
2012-06-10  9:38   ` Zbigniew Jędrzejewski-Szmek
2012-06-15  4:40 ` [PATCH v7 0/5] git log -L, all new and shiny Junio C Hamano
2012-06-15 13:29   ` Thomas Rast
2012-06-15 15:23     ` Junio C Hamano
2012-06-16  6:01       ` Junio C Hamano
2012-06-19 10:11         ` Thomas Rast [this message]
2012-06-19 10:33           ` 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=87wr33wqzl.fsf@thomas.inf.ethz.ch \
    --to=trast@inf.ethz.ch \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=struggleyb.nku@gmail.com \
    --cc=trast@student.ethz.ch \
    /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).