From: "Grégoire PARIS" <postmaster@greg0ire.fr>
To: "René Scharfe" <l.s.r@web.de>, "Martin Ågren" <martin.agren@gmail.com>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: phpdoc diff in git -L is not the correct one
Date: Wed, 18 Nov 2020 09:17:49 +0100 [thread overview]
Message-ID: <a205cb0c-95ec-7f9e-0dea-8fd5b4bc694f@greg0ire.fr> (raw)
In-Reply-To: <5a2d70eb-da75-ff59-8ac1-6ba81e1632da@web.de>
Hi René!
Sorry for not seeing your answer before!
On 11/15/20 12:40 AM, René Scharfe wrote:
>
> The --function-context options of git diff and git grep try to show
> comments by including non-empty lines before function lines.
That would indeed do the first part of the job. Do you think something
similarcould be done to remove non-empty lines before the next funcname?
> This
> heuristic might work for -L :funcname:file as well (patch below), but
> breaks seven tests in each of t8001-annotate.sh, t8002-blame.sh and
> t8012-blame-colors.sh.
I haven't written C in 10 literal years but I think I managed to apply
this patch, and something looks wrong: it's looking too "far" before:
See for instance: --- commit 1a8a640f87cad94d36713f45e5e257de20930171
Author: Michael Moravec <me@majkl.me> Date: Mon Mar 5 04:01:58 2018
+0100 Upgrade to Doctrine CS 4.0 diff --git
a/src/Doctrine/Instantiator/Instantiator.php
b/src/Doctrine/Instantiator/Instantiator.php ---
a/src/Doctrine/Instantiator/Instantiator.php +++
b/src/Doctrine/Instantiator/Instantiator.php @@ -31,12 +33,14 @@ */
private static $cachedInstantiators = []; /** - * @var object[] of
objects that can directly be cloned, indexed by class name + * Array of
objects that can directly be cloned, indexed by class name. + * + * @var
object[] */ private static $cachedCloneables = []; /** * {@inheritDoc}
*/ public function instantiate($className) --- Here it's picking changes
in the phpdoc of the property that precedes `instantiate`, (when using
git log
-L/instantiate\(/,-14:src/Doctrine/Instantiator/Instantiator.php) What's
wrong? -- greg0ire
next prev parent reply other threads:[~2020-11-18 8:19 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-14 13:19 phpdoc diff in git -L is not the correct one Grégoire PARIS
2020-11-14 15:32 ` Martin Ågren
2020-11-14 15:55 ` Grégoire PARIS
2020-11-14 17:35 ` Martin Ågren
2020-11-14 23:40 ` René Scharfe
2020-11-18 8:17 ` Grégoire PARIS [this message]
2020-11-18 19:18 ` Martin Ågren
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=a205cb0c-95ec-7f9e-0dea-8fd5b4bc694f@greg0ire.fr \
--to=postmaster@greg0ire.fr \
--cc=git@vger.kernel.org \
--cc=l.s.r@web.de \
--cc=martin.agren@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).