diff options
| author | Junio C Hamano <gitster@pobox.com> | 2020-08-01 13:49:13 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2020-08-01 13:49:13 -0700 |
| commit | dc3c6fb56557bfa4a4f5ed5abca25f119ded6cde (patch) | |
| tree | 1dc405e1d929d69cd95eb998472f5e05c2b4a3f8 | |
| parent | Merge branch 'jc/fmt-merge-msg-suppress-destination' into master (diff) | |
| parent | refs: move the logic to add \t to reflog to the files backend (diff) | |
| download | git-dc3c6fb56557bfa4a4f5ed5abca25f119ded6cde.tar.gz git-dc3c6fb56557bfa4a4f5ed5abca25f119ded6cde.zip | |
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
Diffstat (limited to '')
| -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 e0aba23eb2..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) + 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; |
