Merge branch 'cw/strbuf-cleanup' into next

Move functions that are not about pure string manipulation out of
strbuf.[ch]

* cw/strbuf-cleanup:
  strbuf: remove global variable
  path: move related function to path
  object-name: move related functions to object-name
  credential-store: move related functions to credential-store file
  abspath: move related functions to abspath
  strbuf: clarify dependency
  strbuf: clarify API boundary
This commit is contained in:
Junio C Hamano
2023-06-28 14:43:17 -07:00
27 changed files with 231 additions and 194 deletions

View File

@ -509,7 +509,8 @@ static void fmt_tag_signature(struct strbuf *tagbuf,
strbuf_complete_line(tagbuf);
if (sig->len) {
strbuf_addch(tagbuf, '\n');
strbuf_add_commented_lines(tagbuf, sig->buf, sig->len);
strbuf_add_commented_lines(tagbuf, sig->buf, sig->len,
comment_line_char);
}
}
@ -555,7 +556,8 @@ static void fmt_merge_msg_sigs(struct strbuf *out)
strbuf_addch(&tagline, '\n');
strbuf_add_commented_lines(&tagline,
origins.items[first_tag].string,
strlen(origins.items[first_tag].string));
strlen(origins.items[first_tag].string),
comment_line_char);
strbuf_insert(&tagbuf, 0, tagline.buf,
tagline.len);
strbuf_release(&tagline);
@ -563,7 +565,8 @@ static void fmt_merge_msg_sigs(struct strbuf *out)
strbuf_addch(&tagbuf, '\n');
strbuf_add_commented_lines(&tagbuf,
origins.items[i].string,
strlen(origins.items[i].string));
strlen(origins.items[i].string),
comment_line_char);
fmt_tag_signature(&tagbuf, &sig, buf, len);
}
strbuf_release(&payload);