]> git.ipfire.org Git - thirdparty/git.git/commit - Documentation/rev-list-options.txt
revision: allow --ancestry-path to take an argument
authorElijah Newren <newren@gmail.com>
Fri, 19 Aug 2022 04:28:10 +0000 (04:28 +0000)
committerJunio C Hamano <gitster@pobox.com>
Fri, 19 Aug 2022 17:45:08 +0000 (10:45 -0700)
commit257418c59040c13bfa839e01922e21833cda6a52
tree5f511f47be827d91b3a11bfcf973dfe951c3b424
parent1838e21cff17f97900a4987b35ba70ca48bce4b7
revision: allow --ancestry-path to take an argument

We have long allowed users to run e.g.
    git log --ancestry-path master..seen
which shows all commits which satisfy all three of these criteria:
  * are an ancestor of seen
  * are not an ancestor of master
  * have master as an ancestor

This commit allows another variant:
    git log --ancestry-path=$TOPIC master..seen
which shows all commits which satisfy all of these criteria:
  * are an ancestor of seen
  * are not an ancestor of master
  * have $TOPIC in their ancestry-path
that last bullet can be defined as commits meeting any of these
criteria:
    * are an ancestor of $TOPIC
    * have $TOPIC as an ancestor
    * are $TOPIC

This also allows multiple --ancestry-path arguments, which can be
used to find commits with any of the given topics in their ancestry
path.

Signed-off-by: Elijah Newren <newren@gmail.com>
Acked-by: Derrick Stolee <derrickstolee@github.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/rev-list-options.txt
object.h
revision.c
revision.h
t/t6019-rev-list-ancestry-path.sh