Skip to content

Commit dc3c6fb

Browse files
committed
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
2 parents 341a196 + 25429fe commit dc3c6fb

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

refs.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -907,7 +907,6 @@ static void copy_reflog_msg(struct strbuf *sb, const char *msg)
907907
char c;
908908
int wasspace = 1;
909909

910-
strbuf_addch(sb, '\t');
911910
while ((c = *msg++)) {
912911
if (wasspace && isspace(c))
913912
continue;

refs/files-backend.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1628,8 +1628,10 @@ static int log_ref_write_fd(int fd, const struct object_id *old_oid,
16281628
int ret = 0;
16291629

16301630
strbuf_addf(&sb, "%s %s %s", oid_to_hex(old_oid), oid_to_hex(new_oid), committer);
1631-
if (msg && *msg)
1631+
if (msg && *msg) {
1632+
strbuf_addch(&sb, '\t');
16321633
strbuf_addstr(&sb, msg);
1634+
}
16331635
strbuf_addch(&sb, '\n');
16341636
if (write_in_full(fd, sb.buf, sb.len) < 0)
16351637
ret = -1;

0 commit comments

Comments
 (0)