list mirror (unofficial, one of many)
 help / color / mirror / code / Atom feed
From: "Martin Ågren" <>
To: "Grégoire PARIS" <>
Cc: Git Mailing List <>
Subject: Re: phpdoc diff in git -L is not the correct one
Date: Sat, 14 Nov 2020 18:35:02 +0100	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>


On Sat, 14 Nov 2020 at 16:55, Grégoire PARIS <> wrote:

> > In the end I think your best option right now is to give explicit line
> > numbers for <end> and <start>.
> That is indeed what I currently do, I plugged that to vim's visual
> selection with
>    vnoremap <leader>l :<c-u>exe '!git log -L'
> line("'<").','.line("'>").':'.expand('%')<CR>
> and it works great!


> I also suppose the issue is the same for any other language that has
> documentation above function declarations.

Yeah, you'll see the same thing for C files, e.g., using this in the
repo of Git itself:

  git log -L :strbuf_swap:strbuf.h

It will follow the lines from the function definition all the way down
to the next function, but just as you saw in your example, it will not
match the comment immediately *before* the function. That is, these
lines will be followed:


  reply	other threads:[~2020-11-14 17:36 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-14 13:19 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 [this message]
2020-11-14 23:40       ` René Scharfe
2020-11-18  8:17         ` Grégoire PARIS
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:

  List information:

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

  git send-email \
    --in-reply-to='' \ \ \ \
    --subject='Re: phpdoc diff in git -L is not the correct one' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Code repositories for project(s) associated with this inbox:

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).