mirror of
https://github.com/tj/git-extras.git
synced 2026-09-09 23:16:17 -04:00
* feat(mr): support Forgejo/Codeberg pull request URLs Codeberg and other Forgejo instances expose pull requests under refs/pull/<id>/head instead of GitLab's refs/merge-requests/<id>/head, so passing a Codeberg pull request URL to git mr fetched the wrong ref. Recognize the /pulls/<id> URL shape and switch to the matching ref for that case, leaving the GitLab URL and bare numeric id behavior unchanged. Closes #1213 * test(git-mr): cover Forgejo/Codeberg URLs, regenerate man docs Add a bats test that exercises the pulls URL branch via a local insteadOf remote rewrite (no real HTTP endpoint needed), and bring git-mr.1/git-mr.html in line with the git-mr.md changes. --------- Co-authored-by: vjymisal0 <vijay.looprai@gmail.com> |
||
|---|---|---|
| .. | ||
| bin | ||
| git-abort.bats | ||
| git-alias.bats | ||
| git-archive-file.bats | ||
| git-authors.bats | ||
| git-browse-ci.bats | ||
| git-browse.bats | ||
| git-continue.bats | ||
| git-mr.bats | ||
| git-scp.bats | ||
| is-git-repo.bats | ||
| README.md | ||
| test_util.sh | ||
Testing
Tests are written in Bats so coverage can be calculated for shell commands.
Bats Testing
We require a somewhat recent version of Bats. Version v1.8.1 is tested in CI. Once it is installed, the tests can be executed like so:
bats ./tests
We highly recommend adding Bats tests for new features and fixes.
Code Coverage
Coverage can be calculated with bashcov like so:
bashcov -- bats ./tests
By default, the report will be generated in ./coverage/index.html.