0

How do I check if a revision is among the ancestors of a commit. Is this done with rev-list?

TL;DR I am looking for the omition of a recently added line of code and a git bisect ends up suggesting very distant revision that doesn’t share ancestry and with the revision that add that partical line of code (but also is merged). So to qualify as a bad bisect the partical line of code must have once been added before.

Drew Noakes
  • 266,361
  • 143
  • 616
  • 705
Martin
  • 350
  • 1
  • 9

1 Answers1

3
git merge-base --is-ancestor <ancestor> <descendant>

This command has an exit code of 0 if ancestor is an ancestor of descendant, otherwise returns 1.

Drew Noakes
  • 266,361
  • 143
  • 616
  • 705