MCPcopy Create free account
hub / github.com/git/git / add_rejected_path

Function add_rejected_path

unpack-trees.c:242–259  ·  view source on GitHub ↗

* add error messages on path * corresponding to the type with the message * indicating if it should be display in porcelain or not */

Source from the content-addressed store, hash-verified

240 * indicating if it should be display in porcelain or not
241 */
242static int add_rejected_path(struct unpack_trees_options *o,
243 enum unpack_trees_error_types e,
244 const char *path)
245{
246 if (o->quiet)
247 return -1;
248
249 if (!o->internal.show_all_errors)
250 return error(ERRORMSG(o, e), super_prefixed(path,
251 o->super_prefix));
252
253 /*
254 * Otherwise, insert in a list for future display by
255 * display_(error|warning)_msgs()
256 */
257 string_list_append(&o->internal.unpack_rejects[e], path);
258 return -1;
259}
260
261/*
262 * display all the error messages stored in a nice way

Callers 7

warn_conflicted_pathFunction · 0.85
reject_mergeFunction · 0.85
verify_uptodate_1Function · 0.85
check_ok_to_removeFunction · 0.85
verify_absent_1Function · 0.85

Calls 3

errorFunction · 0.85
super_prefixedFunction · 0.85
string_list_appendFunction · 0.70

Tested by

no test coverage detected