Merge branch 'hn/reftable' into master
Brown-paper-bag fix. * hn/reftable: refs: move the logic to add \t to reflog to the files backendmaint
commit
dc3c6fb565
1
refs.c
1
refs.c
|
@ -907,7 +907,6 @@ static void copy_reflog_msg(struct strbuf *sb, const char *msg)
|
||||||
char c;
|
char c;
|
||||||
int wasspace = 1;
|
int wasspace = 1;
|
||||||
|
|
||||||
strbuf_addch(sb, '\t');
|
|
||||||
while ((c = *msg++)) {
|
while ((c = *msg++)) {
|
||||||
if (wasspace && isspace(c))
|
if (wasspace && isspace(c))
|
||||||
continue;
|
continue;
|
||||||
|
|
|
@ -1628,8 +1628,10 @@ static int log_ref_write_fd(int fd, const struct object_id *old_oid,
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
strbuf_addf(&sb, "%s %s %s", oid_to_hex(old_oid), oid_to_hex(new_oid), committer);
|
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_addstr(&sb, msg);
|
||||||
|
}
|
||||||
strbuf_addch(&sb, '\n');
|
strbuf_addch(&sb, '\n');
|
||||||
if (write_in_full(fd, sb.buf, sb.len) < 0)
|
if (write_in_full(fd, sb.buf, sb.len) < 0)
|
||||||
ret = -1;
|
ret = -1;
|
||||||
|
|
Loading…
Reference in New Issue