aboutsummaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2016-10-26 13:14:46 -0700
committerJunio C Hamano <gitster@pobox.com>2016-10-26 13:14:47 -0700
commit92657ea597310c05b8f4ac3496ba90496286b5d6 (patch)
treecf35cd3a6b4108807c68357a50be3a5e193c3c80 /builtin
parentcaabffaf375d0f4b9195a04e9141852229ee5aee (diff)
parent4f21454b55f4237b7d0487ad5099c9edf4fc3967 (diff)
downloadgit-92657ea597310c05b8f4ac3496ba90496286b5d6.tar.gz
git-92657ea597310c05b8f4ac3496ba90496286b5d6.tar.xz
Merge branch 'jk/merge-base-fork-point-without-reflog'
"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
Diffstat (limited to 'builtin')
-rw-r--r--builtin/merge-base.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/builtin/merge-base.c b/builtin/merge-base.c
index c0d1822eb..b572a37c2 100644
--- a/builtin/merge-base.c
+++ b/builtin/merge-base.c
@@ -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;