commit.c: use strchrnul() to scan for one line