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

Function error_resolve_conflict

advice.c:201–226  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

199}
200
201int error_resolve_conflict(const char *me)
202{
203 if (!strcmp(me, "cherry-pick"))
204 error(_("Cherry-picking is not possible because you have unmerged files."));
205 else if (!strcmp(me, "commit"))
206 error(_("Committing is not possible because you have unmerged files."));
207 else if (!strcmp(me, "merge"))
208 error(_("Merging is not possible because you have unmerged files."));
209 else if (!strcmp(me, "pull"))
210 error(_("Pulling is not possible because you have unmerged files."));
211 else if (!strcmp(me, "revert"))
212 error(_("Reverting is not possible because you have unmerged files."));
213 else if (!strcmp(me, "rebase"))
214 error(_("Rebasing is not possible because you have unmerged files."));
215 else
216 BUG("Unhandled conflict reason '%s'", me);
217
218 if (advice_enabled(ADVICE_RESOLVE_CONFLICT))
219 /*
220 * Message used both when 'git commit' fails and when
221 * other commands doing a merge do.
222 */
223 advise(_("Fix them up in the work tree, and then use 'git add/rm <file>'\n"
224 "as appropriate to mark resolution and make a commit."));
225 return -1;
226}
227
228void NORETURN die_resolve_conflict(const char *me)
229{

Callers 3

error_dirty_indexFunction · 0.85
do_resetFunction · 0.85
die_resolve_conflictFunction · 0.85

Calls 3

errorFunction · 0.85
advice_enabledFunction · 0.85
adviseFunction · 0.85

Tested by

no test coverage detected