From: Junio C Hamano Date: Tue, 26 Apr 2011 23:47:46 GMT Subject: Re: [PATCH/RFC] Implemented return value for rev-list --quiet Message-ID: <7vpqo8bmn1.fsf@alter.siamese.dyndns.org> In-Reply-To: <4DB755D2.10303@boolsoft.org> Jonas Gehring writes: > Thank you for this explanation, this really cleared up the intended > ... I wanted to use it for ancestry testing of two > commits,... > > After some additional digging, I realized that git-merge-base is the > right tool for my task. Either test "$(git merge-base A B)" = "$(git rev-parse A)" or test -z "$(git rev-list -1 A..B)" would be valid ways to see if A is an ancestor of B.