diff options
author | Junio C Hamano <gitster@pobox.com> | 2016-10-28 09:01:17 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-10-28 09:01:17 -0700 |
commit | 96ec83ce5207be0aac3c1df1ac92356f9de9ad81 (patch) | |
tree | 2fd2924a0023333772153f04fe654fbd8641e5b3 /builtin | |
parent | a5406125cc3989a7007d4fad7e5757cdb9837ebf (diff) | |
parent | 4f21454b55f4237b7d0487ad5099c9edf4fc3967 (diff) | |
download | git-96ec83ce5207be0aac3c1df1ac92356f9de9ad81.tar.gz |
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
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/merge-base.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/builtin/merge-base.c b/builtin/merge-base.c index c0d1822eb3..b572a37c26 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; |