summaryrefslogtreecommitdiff
path: root/setup.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2015-08-24 13:20:39 -0700
committerJunio C Hamano <gitster@pobox.com>2015-08-25 12:49:19 -0700
commit1f76a10b2d72245332ac41bd79249cb82f3946f0 (patch)
treefe99b9539117ac164cd05ea50143539c8abf21cd /setup.c
parente7ffa38c6e726e8014b76297b06f78e008deb2d0 (diff)
downloadgit-1f76a10b2d72245332ac41bd79249cb82f3946f0.tar.gz
write_file(): drop caller-supplied LF from calls to create a one-liner filejc/am-state-fix
All of the callsites covered by this change call write_file() or write_file_gently() to create a one-liner file. Drop the caller supplied LF and let these callees to append it as necessary. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'setup.c')
-rw-r--r--setup.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/setup.c b/setup.c
index feb85651ef..a206781d58 100644
--- a/setup.c
+++ b/setup.c
@@ -404,7 +404,7 @@ static void update_linked_gitdir(const char *gitfile, const char *gitdir)
strbuf_addf(&path, "%s/gitfile", gitdir);
if (stat(path.buf, &st) || st.st_mtime + 24 * 3600 < time(NULL))
- write_file_gently(path.buf, "%s\n", gitfile);
+ write_file_gently(path.buf, "%s", gitfile);
strbuf_release(&path);
}