summaryrefslogtreecommitdiff
path: root/transport.c
diff options
context:
space:
mode:
Diffstat (limited to 'transport.c')
-rw-r--r--transport.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/transport.c b/transport.c
index 37e4f5e..e34ab92 100644
--- a/transport.c
+++ b/transport.c
@@ -655,23 +655,24 @@ static void print_ok_ref_status(struct ref *ref, int porcelain)
"[new branch]"),
ref, ref->peer_ref, NULL, porcelain);
else {
- char quickref[84];
+ struct strbuf quickref = STRBUF_INIT;
char type;
const char *msg;
- strcpy(quickref, status_abbrev(ref->old_sha1));
+ strbuf_addstr(&quickref, status_abbrev(ref->old_sha1));
if (ref->forced_update) {
- strcat(quickref, "...");
+ strbuf_addstr(&quickref, "...");
type = '+';
msg = "forced update";
} else {
- strcat(quickref, "..");
+ strbuf_addstr(&quickref, "..");
type = ' ';
msg = NULL;
}
- strcat(quickref, status_abbrev(ref->new_sha1));
+ strbuf_addstr(&quickref, status_abbrev(ref->new_sha1));
- print_ref_status(type, quickref, ref, ref->peer_ref, msg, porcelain);
+ print_ref_status(type, quickref.buf, ref, ref->peer_ref, msg, porcelain);
+ strbuf_release(&quickref);
}
}