Merge branch 'ma/fast-export-skip-merge-fix'
"git fast-export" had a regression in v2.15.0 era where it skipped some merge commits in certain cases, which has been corrected. * ma/fast-export-skip-merge-fix: fast-export: fix regression skipping some merge-commits
This commit is contained in:
@ -651,8 +651,11 @@ static void handle_tail(struct object_array *commits, struct rev_info *revs,
|
|||||||
struct commit *commit;
|
struct commit *commit;
|
||||||
while (commits->nr) {
|
while (commits->nr) {
|
||||||
commit = (struct commit *)object_array_pop(commits);
|
commit = (struct commit *)object_array_pop(commits);
|
||||||
if (has_unshown_parent(commit))
|
if (has_unshown_parent(commit)) {
|
||||||
|
/* Queue again, to be handled later */
|
||||||
|
add_object_array(&commit->object, NULL, commits);
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
handle_commit(commit, revs, paths_of_changed_objects);
|
handle_commit(commit, revs, paths_of_changed_objects);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -538,4 +538,22 @@ test_expect_success 'when using -C, do not declare copy when source of copy is a
|
|||||||
test_cmp expected actual
|
test_cmp expected actual
|
||||||
'
|
'
|
||||||
|
|
||||||
|
test_expect_success 'merge commit gets exported with --import-marks' '
|
||||||
|
test_create_repo merging &&
|
||||||
|
(
|
||||||
|
cd merging &&
|
||||||
|
test_commit initial &&
|
||||||
|
git checkout -b topic &&
|
||||||
|
test_commit on-topic &&
|
||||||
|
git checkout master &&
|
||||||
|
test_commit on-master &&
|
||||||
|
test_tick &&
|
||||||
|
git merge --no-ff -m Yeah topic &&
|
||||||
|
|
||||||
|
echo ":1 $(git rev-parse HEAD^^)" >marks &&
|
||||||
|
git fast-export --import-marks=marks master >out &&
|
||||||
|
grep Yeah out
|
||||||
|
)
|
||||||
|
'
|
||||||
|
|
||||||
test_done
|
test_done
|
||||||
|
Reference in New Issue
Block a user