branch names ending in .txt is not accessible via the api

Summary

Getting a single repository branch via the API does not work when the branch name ends in .txt

Steps to reproduce

Create a branch on your repo that ends in .txt

Expected behavior

It should show all the branch attributes just like other branches

Screenshot with examples of other branches and the other-feature.txt branch.

branch-name-txt

/cc @DouweM