Skip to contentSkip to conversation

Teach "git-merge-base --check-ancestry" about refs.

PATCH In review Junio C Hamano 1 participant 1 message Jun 15, 2016 Documentation

lore
Share & tools
lore
#0 lore raw

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.

---
 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
index 7d4d027..21b5dd3 100644
@@ -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