Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1d0bed9

Browse files
committed
merge-base: Style
1 parent 4cacf5b commit 1d0bed9

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/merge.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,9 @@ static int remove_redundant(git_revwalk *walk, git_vector *commits)
418418
int error = 0;
419419

420420
redundant = git__calloc(commits->length, 1);
421+
GITERR_CHECK_ALLOC(redundant);
421422
filled_index = git__calloc((commits->length - 1), sizeof(unsigned int));
423+
GITERR_CHECK_ALLOC(filled_index);
422424

423425
for (i = 0; i < commits->length; ++i) {
424426
if ((error = git_commit_list_parse(walk, commits->contents[i])) < 0)
@@ -511,7 +513,10 @@ int git_merge__bases_many(git_commit_list **out, git_revwalk *walk, git_commit_l
511513
return -1;
512514
}
513515

514-
/* more than one merge base -- remove redundants */
516+
/*
517+
* more than one merge base -- see if there are redundant merge
518+
* bases and remove them
519+
*/
515520
if (result && result->next) {
516521
git_vector redundant = GIT_VECTOR_INIT;
517522

0 commit comments

Comments
 (0)