summaryrefslogtreecommitdiff
path: root/wt-status.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2016-10-06 14:53:12 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2016-10-06 14:53:12 -0700
commitf0798e6cdbf99515391242e20f8df495a14e9c22 (patch)
treede83eeb548197f6c2493a48a617b0f47e4d39a79 /wt-status.c
parentMerge branch 'rs/c-auto-resets-attributes' (diff)
parentcoccicheck: make transformation for strbuf_addf(sb, "...") more precise (diff)
downloadtgif-f0798e6cdbf99515391242e20f8df495a14e9c22.tar.xz
Merge branch 'rs/cocci'
Code clean-up with help from coccinelle tool continues. * rs/cocci: coccicheck: make transformation for strbuf_addf(sb, "...") more precise use strbuf_add_unique_abbrev() for adding short hashes, part 2 use strbuf_addstr() instead of strbuf_addf() with "%s", part 2 gitignore: ignore output files of coccicheck make target
Diffstat (limited to 'wt-status.c')
-rw-r--r--wt-status.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/wt-status.c b/wt-status.c
index 9628c1d5d7..99d1b0a818 100644
--- a/wt-status.c
+++ b/wt-status.c
@@ -1383,8 +1383,7 @@ static int grab_1st_switch(unsigned char *osha1, unsigned char *nsha1,
if (!strcmp(cb->buf.buf, "HEAD")) {
/* HEAD is relative. Resolve it to the right reflog entry. */
strbuf_reset(&cb->buf);
- strbuf_addstr(&cb->buf,
- find_unique_abbrev(nsha1, DEFAULT_ABBREV));
+ strbuf_add_unique_abbrev(&cb->buf, nsha1, DEFAULT_ABBREV);
}
return 1;
}