Teach "git-merge-base --check-ancestry" about refs.
PATCH 6/6 Teach "git-merge-base --check-ancestry" about refs.
"git-merge-base --all -c $commit" is used to see if $commit is reachable from any ref.
Signed-off-by Junio C Hamano <[email protected]>
--- Documentation/git-merge-base.txt | 6 ++++- builtin-merge-base.c | 45 ++++++++++++++++++++++++++++++++----- 2 files changed, 44 insertions(+), 7 deletions(-)
Documentation/git-merge-base.txt +5 -1
@@ -10,7 +10,7 @@ SYNOPSIS -------- [verse] 'git-merge-base' [--all] <commit> <commit> -'git-merge-base' --check-ancestry <commit> <commit>... +'git-merge-base' [--all] --check-ancestry <commit> <commit>... DESCRIPTION -----------
@@ -33,6 +33,10 @@ OPTIONS --all:: Output all common ancestors for the two commits instead of just one. ++ +When used with `--check-ancestry` option, this uses all the +commits that are at the tip of all refs to see if the given +commit is an ancestor of any of them. --check-ancestry::
builtin-merge-base.c +39 -6
73 lines not on this page · raw message
Signature · 1 line
1.4.4.4.g564d