aboutsummaryrefslogtreecommitdiff
path: root/transport.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 /transport.c
parente7ffa38c6e726e8014b76297b06f78e008deb2d0 (diff)
downloadgit-1f76a10b2d72245332ac41bd79249cb82f3946f0.tar.gz
git-1f76a10b2d72245332ac41bd79249cb82f3946f0.tar.xz
write_file(): drop caller-supplied LF from calls to create a one-liner file
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 'transport.c')
-rw-r--r--transport.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/transport.c b/transport.c
index 025439435..788cf2058 100644
--- a/transport.c
+++ b/transport.c
@@ -291,7 +291,7 @@ static int write_one_ref(const char *name, const struct object_id *oid,
strbuf_addstr(buf, name);
if (safe_create_leading_directories(buf->buf) ||
- write_file_gently(buf->buf, "%s\n", oid_to_hex(oid)))
+ write_file_gently(buf->buf, "%s", oid_to_hex(oid)))
return error("problems writing temporary file %s: %s",
buf->buf, strerror(errno));
strbuf_setlen(buf, len);