Merge branch 'jk/merge-base-fork-point-without-reflog' into maint
authorJunio C Hamano <gitster@pobox.com>
Fri, 28 Oct 2016 16:01:17 +0000 (09:01 -0700)
committerJunio C Hamano <gitster@pobox.com>
Fri, 28 Oct 2016 16:01:17 +0000 (09:01 -0700)
"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

1  2 
t/t6010-merge-base.sh
diff --combined t/t6010-merge-base.sh
index e0c5f44cac0290c6e15c5360b0cc7c1f4d486614,de3bf0741c06a9f0b7163794190dba46ba2d462b..31db7b5f9125ed346450d7bfe29d8bb5fac0460a
@@@ -215,13 -215,11 +215,13 @@@ test_expect_success 'criss-cross merge-
        git reset --hard E &&
        test_commit CC2 &&
        test_tick &&
 -      git merge -s ours CC1 &&
 +      # E is a root commit unrelated to MMR root on which CC1 is based
 +      git merge -s ours --allow-unrelated-histories CC1 &&
        test_commit CC-o &&
        test_commit CCB &&
        git reset --hard CC1 &&
 -      git merge -s ours CC2 &&
 +      # E is a root commit unrelated to MMR root on which CC1 is based
 +      git merge -s ours --allow-unrelated-histories CC2 &&
        test_commit CCA &&
  
        git rev-parse CC1 CC2 >expected &&
@@@ -260,6 -258,12 +260,12 @@@ test_expect_success 'using reflog to fi
        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