git: handle newlines in .git files

Closes #213

Reported-by: Jérôme Carretero <cJ@zougloub.eu>
Signed-off-by: David Aguilar <davvid@gmail.com>