spacedentist / spr

Submit pull requests for individual, amendable, rebaseable commits to GitHub

Home Page:https://getcord.github.io/spr/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`spr init` should validate the provided branchPrefix

AdarLieberDembo-at opened this issue · comments

As the branchPrefix will be part of the refname, it should be validated against the criteria found in the git check-ref-format manpage. Otherwise spr diff can fail like this:

fatal: invalid refspec '40cf956ffd653ba646b24d0fef9cb1696300babb:refs/heads/spr/someUser/[bad branchPrefix]/some-commit-summary'
  �  git push failed

I thought this was a reasonably straightforward issue to dive in and get my hands dirty. Love the idea behind the spr tool and even better that it's written in Rust :)