From: Junio C Hamano Date: Thu, 6 Oct 2016 21:53:12 +0000 (-0700) Subject: Merge branch 'rs/cocci' X-Git-Tag: v2.11.0-rc0~76 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f0798e6cdbf99515391242e20f8df495a14e9c22;p=thirdparty%2Fgit.git 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 --- f0798e6cdbf99515391242e20f8df495a14e9c22 diff --cc submodule.c index aba94dd07d,1e28437a5a..2de06a3351 --- a/submodule.c +++ b/submodule.c @@@ -391,12 -370,11 +391,12 @@@ static void show_submodule_header(FILE return; } +output_header: strbuf_addf(&sb, "%s%sSubmodule %s %s..", line_prefix, meta, path, - find_unique_abbrev(one, DEFAULT_ABBREV)); + find_unique_abbrev(one->hash, DEFAULT_ABBREV)); if (!fast_backward && !fast_forward) strbuf_addch(&sb, '.'); - strbuf_addf(&sb, "%s", find_unique_abbrev(two->hash, DEFAULT_ABBREV)); - strbuf_add_unique_abbrev(&sb, two, DEFAULT_ABBREV); ++ strbuf_add_unique_abbrev(&sb, two->hash, DEFAULT_ABBREV); if (message) strbuf_addf(&sb, " %s%s\n", message, reset); else