| 2158 | } |
| 2159 | |
| 2160 | static void add_unset_auto_comment_char_advice(struct repository *repo, |
| 2161 | struct comment_char_config *config) |
| 2162 | { |
| 2163 | struct strbuf buf = STRBUF_INIT; |
| 2164 | |
| 2165 | if (!can_unset_comment_char_config(config)) |
| 2166 | return; |
| 2167 | |
| 2168 | for (size_t i = 0; i < config->nr; i++) { |
| 2169 | struct comment_char_config_item *item = &config->item[i]; |
| 2170 | |
| 2171 | strbuf_addstr(&buf, " git config unset "); |
| 2172 | add_config_scope_arg(repo, &buf, item); |
| 2173 | if (get_comment_key_flags(config, item->path, item->key_id) == KEY_SEEN_TWICE) |
| 2174 | strbuf_addstr(&buf, "--all "); |
| 2175 | strbuf_addf(&buf, "%s\n", comment_key_name(item->key_id)); |
| 2176 | } |
| 2177 | advise(_("\nTo use the default comment string (#) please run\n\n%s"), |
| 2178 | buf.buf); |
| 2179 | strbuf_release(&buf); |
| 2180 | } |
| 2181 | |
| 2182 | static void add_comment_char_advice(struct repository *repo, |
| 2183 | struct comment_char_config *config) |
no test coverage detected