| 75 | |
| 76 | |
| 77 | def test_describe_committish(testrepo: Repository) -> None: |
| 78 | add_tag(testrepo, 'thetag', 'acecd5ea2924a4b900e7e149496e1f4b57976e51') |
| 79 | assert 'thetag-4-g2be5719' == testrepo.describe(committish='HEAD') |
| 80 | assert 'thetag-1-g5ebeeeb' == testrepo.describe(committish='HEAD^') |
| 81 | |
| 82 | assert 'thetag-4-g2be5719' == testrepo.describe(committish=testrepo.head) |
| 83 | |
| 84 | assert 'thetag-1-g6aaa262' == testrepo.describe( |
| 85 | committish='6aaa262e655dd54252e5813c8e5acd7780ed097d' |
| 86 | ) |
| 87 | assert 'thetag-1-g6aaa262' == testrepo.describe(committish='6aaa262') |
| 88 | |
| 89 | |
| 90 | def test_describe_follows_first_branch_only(testrepo: Repository) -> None: |