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

Function append_conflicts_hint

sequencer.c:721–744  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

719}
720
721void append_conflicts_hint(struct index_state *istate,
722 struct strbuf *msgbuf, enum commit_msg_cleanup_mode cleanup_mode)
723{
724 int i;
725
726 if (cleanup_mode == COMMIT_MSG_CLEANUP_SCISSORS) {
727 strbuf_addch(msgbuf, '\n');
728 wt_status_append_cut_line(msgbuf);
729 strbuf_addstr(msgbuf, comment_line_str);
730 }
731
732 strbuf_addch(msgbuf, '\n');
733 strbuf_commented_addf(msgbuf, comment_line_str, "Conflicts:\n");
734 for (i = 0; i < istate->cache_nr;) {
735 const struct cache_entry *ce = istate->cache[i++];
736 if (ce_stage(ce)) {
737 strbuf_commented_addf(msgbuf, comment_line_str,
738 "\t%s\n", ce->name);
739 while (i < istate->cache_nr &&
740 !strcmp(ce->name, istate->cache[i]->name))
741 i++;
742 }
743 }
744}
745
746static int do_recursive_merge(struct repository *r,
747 struct commit *base, struct commit *next,

Callers 2

do_recursive_mergeFunction · 0.85
suggest_conflictsFunction · 0.85

Calls 4

strbuf_addchFunction · 0.85
strbuf_addstrFunction · 0.85
strbuf_commented_addfFunction · 0.85

Tested by

no test coverage detected