builtin/am: make sure state files are text
commit57c867efe4e005e40cfdee8a64550d7a95bbb9a0
authorJunio C Hamano <gitster@pobox.com>
Mon, 24 Aug 2015 16:43:41 +0000 (24 09:43 -0700)
committerJunio C Hamano <gitster@pobox.com>
Mon, 24 Aug 2015 20:01:59 +0000 (24 13:01 -0700)
tree9e7b8f7e0a6ea2be11e55cefd672c42895b08887
parent25b763ba7a544d05fc46ad601f3f9c50a4cea8b0
builtin/am: make sure state files are text

We forgot to terminate the payload given to write_file() with LF,
resulting in files that end with an incomplete line.  Teach the
wrappers builtin/am uses to make sure it adds LF at the end as
necessary.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/am.c