Merge branch 'hn/reftable' into master
Brown-paper-bag fix.
* hn/reftable:
refs: move the logic to add \t to reflog to the files backend
diff --git a/refs.c b/refs.c
index 89814c7..2dd851f 100644
--- a/refs.c
+++ b/refs.c
@@ -907,7 +907,6 @@
char c;
int wasspace = 1;
- strbuf_addch(sb, '\t');
while ((c = *msg++)) {
if (wasspace && isspace(c))
continue;
diff --git a/refs/files-backend.c b/refs/files-backend.c
index e0aba23..985631f 100644
--- a/refs/files-backend.c
+++ b/refs/files-backend.c
@@ -1628,8 +1628,10 @@
int ret = 0;
strbuf_addf(&sb, "%s %s %s", oid_to_hex(old_oid), oid_to_hex(new_oid), committer);
- if (msg && *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;