From: Isabella Stephens Date: Thu, 26 Oct 2017 22:50:26 GMT Subject: Re: [PATCH v2] blame: prevent error if range ends past end of file Message-ID: In-Reply-To: On 26/10/17 7:48 pm, Jacob Keller wrote: > On Thu, Oct 26, 2017 at 12:01 AM, Isabella Stephens > wrote: >> If the -L option is used to specify a line range in git blame, and the >> end of the range is past the end of the file, at present git will fail >> with a fatal error. This commit prevents such behaviour - instead the >> blame is display for any existing lines within the specified range. >> >> Signed-off-by: Isabella Stephens >> --- > > I like this change. We might want to document L to indicate that an L > that is outside the range of lines will show all lines that do match. > > Maybe we also want it to only succeed if at least some lines are > blamed? Could we make it so that it fails if no lines are within the > range? (ie: the start point is too far in? or does it already do > such?) > > Thanks, > Jake Yep, that is exactly how it behaves now - if a range intersects the file at all it will annotate the relevant lines, otherwise it will fail. I'll add a clarification to the documentation in my next revision. Thanks for reviewing!