Re: [PATCH] blame: add --fuzzy-lines command line option
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Oct 26, 2017, 06:15 UTC
- Message-ID
- <xmqqtvyme8pg.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <20171026021929.1346-1-istephens@atlassian.com>
Isabella Stephens <istephens@atlassian.com> writes:
> 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, git will fail with a fatal > error. It may instead be desirable to perform a git blame for the line > numbers in the intersection of the file and the specified line range.
Even though erroring out upon such input was done as a deliberate design decision, in retrospect, I do not think the design decision made much sense.
The code already takes a nonsense input and tries to make best sense of it, e.g. "-L10,6" is interpreted as "-L6,10" instead of erroring out. So if we were to do this kind of change, I suspect that it may be better to do so unconditionally without introducing a new option.
Thanks.