Re: [PATCH 2/2] Documentation/git-log: mention that line-log regex must match in starting revision
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Dec 17, 2019, 18:16 UTC
- Message-ID
- <xmqq5zieizrb.fsf@gitster-ct.c.googlers.com>
- In-Reply-To
- <1d033204-80fd-25f8-3a80-0cb641953139@gmail.com>
Derrick Stolee <stolee@gmail.com> writes:
Show 12 quoted lines
> On 12/17/2019 12:07 AM, Philippe Blain via GitGitGadget wrote: >> From: Philippe Blain <levraiphilippeblain@gmail.com> >> >> When giving a regex as parameter <start> or <end> in >> `git log -L <start>,<end>:<file>`, or a function name in >> `git log -L :<funcname>:<file>`, the given regex must match in the starting >> revision, or else the command exits with a fatal error. >> >> This is not obvious in the documentation, so add a note to that >> effect. > > This seems helpful. Thanks.
Even when you specify <start> or <end> as a line number, they must exist in the starting revision or it would be a fatal error. If we are clarifying with this patch for completeness, I think we should also mention it together.
Or we could even drop the mention of regex and say <start> and <end>, regardless of how they are specified (including :<funcname> format), must exist in the starting revision.