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

Function rewrite_parents

revision.c:4072–4092  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4070}
4071
4072int rewrite_parents(struct rev_info *revs, struct commit *commit,
4073 rewrite_parent_fn_t rewrite_parent)
4074{
4075 struct commit_list **pp = &commit->parents;
4076 while (*pp) {
4077 struct commit_list *parent = *pp;
4078 switch (rewrite_parent(revs, &parent->item)) {
4079 case rewrite_one_ok:
4080 break;
4081 case rewrite_one_noparents:
4082 *pp = parent->next;
4083 free(parent);
4084 continue;
4085 case rewrite_one_error:
4086 return -1;
4087 }
4088 pp = &parent->next;
4089 }
4090 remove_duplicate_parents(revs, commit);
4091 return 0;
4092}
4093
4094static int commit_match(struct commit *commit, struct rev_info *opt)
4095{

Callers 2

line_log_filterFunction · 0.85
simplify_commitFunction · 0.85

Calls 1

remove_duplicate_parentsFunction · 0.85

Tested by

no test coverage detected