From: Bagas Sanjaya <bagasdotme@gmail.com>
To: Weishi Zeng <amwish.zeng@gmail.com>, git@vger.kernel.org
Subject: Re: [Bug Report] git log -L:<funcname>:<file>
Date: Thu, 20 May 2021 10:18:18 +0700 [thread overview]
Message-ID: <83740d18-e0ba-e6b5-0356-144373708d4e@gmail.com> (raw)
In-Reply-To: <CAH6yD_bkY+_7XrzHdOqnnE=qvnnvxAWEQPtOyVh=BwvbcheTCA@mail.gmail.com>
Hi Weishi,
On 20/05/21 07.11, Weishi Zeng wrote:
> Summary:
> git log -L:<funcname>:<file>
> would fail if there's any java-style comment that appears before the
> <funcname> string in the file.
>
>
> Details:
> Thank you for filling out a Git bug report!
> Please answer the following questions to help us understand your issue.
>
> What did you do before the bug happened? (Steps to reproduce your issue)
> git log -L:'myFunction':~/a.java
> The file is a java file that contains comment before the function name.
> E.g.
> /**
> * comments will interrupt the regex match
> */
> private static void myFunction() {}
>
> What did you expect to happen? (Expected behavior)
> As described, it should return me the commit history that touched this function
>
> What happened instead? (Actual behavior)
> It returns error:
> fatal: -L parameter 'myFunction' starting at line 1: no match
>
> Anything else you want to add:
> If the function name string to search for appears before any
> java-style comment, it returns a valid response.
>
I can't reproduce this issue on my system (Ubuntu 20.04) using latest Git
(2.32.0-rc0), compiled with gcc 9.3.0.
Please compile latest Git on your system, repeat and report.
--
An old man doll... just what I always wanted! - Clara
next prev parent reply other threads:[~2021-05-20 3:18 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-20 0:11 [Bug Report] git log -L:<funcname>:<file> Weishi Zeng
2021-05-20 3:18 ` Bagas Sanjaya [this message]
2021-05-20 6:45 ` Weishi Zeng
2021-05-20 7:05 ` Atharva Raykar
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=83740d18-e0ba-e6b5-0356-144373708d4e@gmail.com \
--to=bagasdotme@gmail.com \
--cc=amwish.zeng@gmail.com \
--cc=git@vger.kernel.org \
/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).