]> git.ipfire.org Git - thirdparty/git.git/commit
subtree: use `git merge-base --is-ancestor`
authorLuke Shumaker <lukeshu@datawire.io>
Tue, 27 Apr 2021 21:17:33 +0000 (15:17 -0600)
committerJunio C Hamano <gitster@pobox.com>
Wed, 28 Apr 2021 07:47:17 +0000 (16:47 +0900)
commitf66430483645eb764135e5c79b753f1c09170ac8
tree465556a9d10b2300e7a54d75512ea77244201179
parent8dc3240f5fc78aec1b1e6b10b94fa361bf016157
subtree: use `git merge-base --is-ancestor`

Instead of writing a slow `rev_is_descendant_of_branch $a $b` function
in shell, just use the fast `git merge-base --is-ancestor $b $a`.

Signed-off-by: Luke Shumaker <lukeshu@datawire.io>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
contrib/subtree/git-subtree.sh