diff options
author | Junio C Hamano <gitster@pobox.com> | 2020-08-01 20:49:13 (GMT) |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-08-01 20:49:13 (GMT) |
commit | dc3c6fb56557bfa4a4f5ed5abca25f119ded6cde (patch) | |
tree | 1dc405e1d929d69cd95eb998472f5e05c2b4a3f8 | |
parent | 341a196ab6603aa7be709812132fd906a3d2359c (diff) | |
parent | 25429fed5ce134bce9f729d927ac397badae1959 (diff) | |
download | git-dc3c6fb56557bfa4a4f5ed5abca25f119ded6cde.zip git-dc3c6fb56557bfa4a4f5ed5abca25f119ded6cde.tar.gz git-dc3c6fb56557bfa4a4f5ed5abca25f119ded6cde.tar.bz2 |
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
-rw-r--r-- | refs.c | 1 | ||||
-rw-r--r-- | refs/files-backend.c | 4 |
2 files changed, 3 insertions, 2 deletions
@@ -907,7 +907,6 @@ static void copy_reflog_msg(struct strbuf *sb, const char *msg) 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 @@ 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) + 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; |