• Junio C Hamano's avatar
    merge-base: "--is-ancestor A B" · 5907cda1
    Junio C Hamano authored
    In many scripted Porcelain commands, we find this idiom:
    
        if test "$(git rev-parse --verify A)" = "$(git merge-base A B)"
        then
        	... A is an ancestor of B ...
        fi
    
    But you do not have to compute exact merge-base only to see if A is
    an ancestor of B.  Give them a more direct way to use the underlying
    machinery.
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    5907cda1
git-merge-base.txt 4.32 KB