]> granicus.if.org Git - git/commitdiff
Merge branch 'rs/cocci'
authorJunio C Hamano <gitster@pobox.com>
Thu, 6 Oct 2016 21:53:12 +0000 (14:53 -0700)
committerJunio C Hamano <gitster@pobox.com>
Thu, 6 Oct 2016 21:53:12 +0000 (14:53 -0700)
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

1  2 
builtin/submodule--helper.c
diff.c
submodule.c
wt-status.c

Simple merge
diff --cc diff.c
Simple merge
diff --cc submodule.c
index aba94dd07dbd5c8d1e9cad5b3980bb4a9759e6cf,1e28437a5ae21d4f8a861278c974841a9b93571e..2de06a33516d40ab169a9a031df4fb547f9094fd
@@@ -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
diff --cc wt-status.c
Simple merge