3 int advice_push_nonfastforward
= 1;
4 int advice_status_hints
= 1;
5 int advice_commit_before_merge
= 1;
6 int advice_resolve_conflict
= 1;
7 int advice_implicit_identity
= 1;
13 { "pushnonfastforward", &advice_push_nonfastforward
},
14 { "statushints", &advice_status_hints
},
15 { "commitbeforemerge", &advice_commit_before_merge
},
16 { "resolveconflict", &advice_resolve_conflict
},
17 { "implicitidentity", &advice_implicit_identity
},
20 int git_default_advice_config(const char *var
, const char *value
)
22 const char *k
= skip_prefix(var
, "advice.");
25 for (i
= 0; i
< ARRAY_SIZE(advice_config
); i
++) {
26 if (strcmp(k
, advice_config
[i
].name
))
28 *advice_config
[i
].preference
= git_config_bool(var
, value
);
35 void NORETURN
die_resolve_conflict(const char *me
)
37 if (advice_resolve_conflict
)
39 * Message used both when 'git commit' fails and when
40 * other commands doing a merge do.
42 die("'%s' is not possible because you have unmerged files.\n"
43 "Please, fix them up in the work tree, and then use 'git add/rm <file>' as\n"
44 "appropriate to mark resolution and make a commit, or use 'git commit -a'.", me
);
46 die("'%s' is not possible because you have unmerged files.", me
);