diff options
Diffstat (limited to 'refs')
-rw-r--r-- | refs/files-backend.c | 6 | ||||
-rw-r--r-- | refs/refs-internal.h | 6 |
2 files changed, 4 insertions, 8 deletions
diff --git a/refs/files-backend.c b/refs/files-backend.c index 6516c7bc8c..985631f33e 100644 --- a/refs/files-backend.c +++ b/refs/files-backend.c @@ -1628,8 +1628,10 @@ static int log_ref_write_fd(int fd, const struct object_id *old_oid, int ret = 0; strbuf_addf(&sb, "%s %s %s", oid_to_hex(old_oid), oid_to_hex(new_oid), committer); - if (msg && *msg) - copy_reflog_msg(&sb, msg); + if (msg && *msg) { + strbuf_addch(&sb, '\t'); + strbuf_addstr(&sb, msg); + } strbuf_addch(&sb, '\n'); if (write_in_full(fd, sb.buf, sb.len) < 0) ret = -1; diff --git a/refs/refs-internal.h b/refs/refs-internal.h index 4271362d26..357359a0be 100644 --- a/refs/refs-internal.h +++ b/refs/refs-internal.h @@ -96,12 +96,6 @@ enum peel_status { */ enum peel_status peel_object(const struct object_id *name, struct object_id *oid); -/* - * Copy the reflog message msg to sb while cleaning up the whitespaces. - * Especially, convert LF to space, because reflog file is one line per entry. - */ -void copy_reflog_msg(struct strbuf *sb, const char *msg); - /** * Information needed for a single ref update. Set new_oid to the new * value or to null_oid to delete the ref. To check the old value |