Skip to content

Commit

Permalink
Merge branch 'rs/use-strbuf-addbuf' into next
Browse files Browse the repository at this point in the history
Code cleanup.

* rs/use-strbuf-addbuf:
  use strbuf_addbuf() for appending a strbuf to another
  • Loading branch information
gitster committed Jul 19, 2016
2 parents 0140849 + 8109984 commit 679f992
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dir.c
Expand Up @@ -2364,7 +2364,7 @@ void write_untracked_extension(struct strbuf *out, struct untracked_cache *untra

varint_len = encode_varint(untracked->ident.len, varbuf);
strbuf_add(out, varbuf, varint_len);
strbuf_add(out, untracked->ident.buf, untracked->ident.len);
strbuf_addbuf(out, &untracked->ident);

strbuf_add(out, ouc, ouc_size(len));
free(ouc);
Expand Down
2 changes: 1 addition & 1 deletion path.c
Expand Up @@ -483,7 +483,7 @@ static void do_submodule_path(struct strbuf *buf, const char *path,
strbuf_addstr(buf, git_dir);
}
strbuf_addch(buf, '/');
strbuf_addstr(&git_submodule_dir, buf->buf);
strbuf_addbuf(&git_submodule_dir, buf);

strbuf_vaddf(buf, fmt, args);

Expand Down
2 changes: 1 addition & 1 deletion wt-status.c
Expand Up @@ -1063,7 +1063,7 @@ static void abbrev_sha1_in_line(struct strbuf *line)
strbuf_addf(split[1], "%s ", abbrev);
strbuf_reset(line);
for (i = 0; split[i]; i++)
strbuf_addf(line, "%s", split[i]->buf);
strbuf_addbuf(line, split[i]);
}
}
strbuf_list_free(split);
Expand Down

0 comments on commit 679f992

Please sign in to comment.