diff options
author | Junio C Hamano <gitster@pobox.com> | 2018-08-02 15:30:41 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-08-02 15:30:41 -0700 |
commit | 6566a917d8a8d3070b5fdc94fbe5f6d68a4d656b (patch) | |
tree | 5a8ac927a48d840786c5cca578221008f2baf9d1 /t/t8003-blame-corner-cases.sh | |
parent | Merge branch 'jt/fetch-pack-negotiator' (diff) | |
parent | log: prevent error if line range ends past end of file (diff) | |
download | tgif-6566a917d8a8d3070b5fdc94fbe5f6d68a4d656b.tar.xz |
Merge branch 'is/parsing-line-range'
Parsing of -L[<N>][,[<M>]] parameters "git blame" and "git log"
take has been tweaked.
* is/parsing-line-range:
log: prevent error if line range ends past end of file
blame: prevent error if range ends past end of file
Diffstat (limited to 't/t8003-blame-corner-cases.sh')
-rwxr-xr-x | t/t8003-blame-corner-cases.sh | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/t/t8003-blame-corner-cases.sh b/t/t8003-blame-corner-cases.sh index 661f9d430d..c92a47b6d5 100755 --- a/t/t8003-blame-corner-cases.sh +++ b/t/t8003-blame-corner-cases.sh @@ -216,14 +216,18 @@ test_expect_success 'blame -L with invalid start' ' ' test_expect_success 'blame -L with invalid end' ' - test_must_fail git blame -L1,5 tres 2>errors && - test_i18ngrep "has only 2 lines" errors + git blame -L1,5 tres >out && + test_line_count = 2 out ' test_expect_success 'blame parses <end> part of -L' ' git blame -L1,1 tres >out && - cat out && - test $(wc -l < out) -eq 1 + test_line_count = 1 out +' + +test_expect_success 'blame -Ln,-(n+1)' ' + git blame -L3,-4 nine_lines >out && + test_line_count = 3 out ' test_expect_success 'indent of line numbers, nine lines' ' |