spacedentist / spr

Submit pull requests for individual, amendable, rebaseable commits to GitHub
https://getcord.github.io/spr/
MIT License
376 stars 33 forks source link

Support specification of branch name in `spr diff` #186

Open minglotus-6 opened 5 months ago

minglotus-6 commented 5 months ago

It seems to me branch name is slugified from the title currently. This could give lengthy branch names. Git will create a local file(directory?) for a checked-out branch, and as a side effect, lengthy branch names gives lengthy file names. On the other hand, there is a 256-character length limit for filenames on Windows.

It'd be great to support explicit specification of branch names, like spr diff --draft --branch_name=<hand-picked-branch-name-to-ensure-no-branch-conflict>

jrtc27 commented 4 months ago

Better to just have slugify truncate the title at a sane limit like 80, maybe 100, chars. 80's generally deemed normal Git convention (and 72 is when GitHub will, when opening a PR, truncate your commit title and wrap it into the PR body, so that's another option, and a common convention).