Merge branch 'rs/strbuf-insertstr'

Code clean-up.

* rs/strbuf-insertstr:
  mailinfo: don't insert header prefix for handle_content_type()
  strbuf: add and use strbuf_insertstr()
This commit is contained in:
Junio C Hamano
2020-02-17 13:22:17 -08:00
11 changed files with 26 additions and 15 deletions

View File

@ -1334,9 +1334,9 @@ void expand_notes_ref(struct strbuf *sb)
if (starts_with(sb->buf, "refs/notes/"))
return; /* we're happy */
else if (starts_with(sb->buf, "notes/"))
strbuf_insert(sb, 0, "refs/", 5);
strbuf_insertstr(sb, 0, "refs/");
else
strbuf_insert(sb, 0, "refs/notes/", 11);
strbuf_insertstr(sb, 0, "refs/notes/");
}
void expand_loose_notes_ref(struct strbuf *sb)