• J
    merge-base: handle --fork-point without reflog · 4f21454b
    Jeff King 提交于
    The --fork-point option looks in the reflog to try to find
    where a derived branch forked from a base branch. However,
    if the reflog for the base branch is totally empty (as it
    commonly is right after cloning, which does not write a
    reflog entry), then our for_each_reflog call will not find
    any entries, and we will come up with no merge base, even
    though there may be one with the current tip of the base.
    
    We can fix this by just adding the current tip to
    our list of collected entries.
    Signed-off-by: NJeff King <peff@peff.net>
    Signed-off-by: NJunio C Hamano <gitster@pobox.com>
    4f21454b
merge-base.c 6.0 KB