t0021/rot13-filter: refactor checking final lf
authorChristian Couder <christian.couder@gmail.com>
Sun, 5 Nov 2017 21:38:34 +0000 (22:38 +0100)
committerJunio C Hamano <gitster@pobox.com>
Tue, 7 Nov 2017 00:54:41 +0000 (09:54 +0900)
commit4a9ef1bbc19f362a63c3e3ab88c651f97cbd1c1d
tree9dfc8ca6b2bab4c61f6e0ece7aaca66652a4112d
parent25cbfe34656d4cf25e1bf16ac61f981cb3d5c1b3
t0021/rot13-filter: refactor checking final lf

As checking for a lf character at the end of a buffer
will be useful in another function, let's refactor this
functionality into a small remove_final_lf_or_die()
helper function.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t0021/rot13-filter.pl