]> git.99rst.org Git - git.git/commit
merge-base: add tests for --is-ancestor
authorNikolaus Schuetz <redacted>
Thu, 30 Jul 2026 06:19:09 +0000 (06:19 +0000)
committerJunio C Hamano <redacted>
Thu, 30 Jul 2026 16:01:51 +0000 (09:01 -0700)
commit89454a60ed3c668aabdc372327207096c9613e56
tree770d9385fc1f991f8ee99bc91ea60e83f7cb34cd
parent9a0c4701dcd5725c4184599322b52933ff5005ca
merge-base: add tests for --is-ancestor

`git merge-base --is-ancestor A B` is used a lot in scripts but has no
tests. Add some to t6010 covering its exit codes: 0 when A is an
ancestor of B, 1 when it is not, and 128 (not 1) when given a bad
argument. Also check that --is-ancestor and --all can't be combined,
and that the resulting error names both options.

Signed-off-by: Nikolaus Schuetz <redacted>
Signed-off-by: Junio C Hamano <redacted>
t/t6010-merge-base.sh
git clone https://git.99rst.org/PROJECT