]> git.ipfire.org Git - thirdparty/git.git/commit - line-log.c
log: fix -L bounds checking bug
authorEric Sunshine <sunshine@sunshineco.com>
Wed, 31 Jul 2013 08:15:41 +0000 (04:15 -0400)
committerJunio C Hamano <gitster@pobox.com>
Mon, 5 Aug 2013 18:54:32 +0000 (11:54 -0700)
commit63828b844d17d66d18c19375c559ab8678693f97
treea7b4bf873403ab35a64ca165d5894dcc98168d77
parent449f5c751c22a12de48c273395540a42460795eb
log: fix -L bounds checking bug

When 12da1d1f added -L support to git-log, a broken bounds check was
copied from git-blame -L which incorrectly allows -LX to extend one line
past end of file without reporting an error.  Instead, it generates an
empty range.  Fix this bug.

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
line-log.c
t/t4211-line-log.sh