提交 96ec83ce 编写于 作者: J Junio C Hamano

Merge branch 'jk/merge-base-fork-point-without-reflog' into maint

"git rebase" immediately after "git clone" failed to find the fork
point from the upstream.

* jk/merge-base-fork-point-without-reflog:
  merge-base: handle --fork-point without reflog
......@@ -173,6 +173,9 @@ static int handle_fork_point(int argc, const char **argv)
revs.initial = 1;
for_each_reflog_ent(refname, collect_one_reflog_ent, &revs);
if (!revs.nr && !get_sha1(refname, sha1))
add_one_commit(sha1, &revs);
for (i = 0; i < revs.nr; i++)
revs.commit[i]->object.flags &= ~TMP_MARK;
......
......@@ -260,6 +260,12 @@ test_expect_success 'using reflog to find the fork point' '
test_cmp expect3 actual
'
test_expect_success '--fork-point works with empty reflog' '
git -c core.logallrefupdates=false branch no-reflog base &&
git merge-base --fork-point no-reflog derived &&
test_cmp expect3 actual
'
test_expect_success 'merge-base --octopus --all for complex tree' '
# Best common ancestor for JE, JAA and JDD is JC
# JE
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册