`gh stack submit` with PULL_REQUEST_TEMPLATE.md that has `CRLF` line endings
- Dominant language
- Go
- Stars
- 1.5k
- Forks
- 70
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 7
Description
**Problem**
Submit is rendering extra line endings when it sees `CRLF`. Opening in the $EDITOR also has these extra line endings.
**Descirption**
When developing on Windows, it is common for git to normalize line endings to CRLF and then back to LF on commit.
On Windows, given a template with the following:
It opens in the submit editor like this (each red mark is an extra newline):
I replaced `CRLF` with `LF`, and then it works fine.
I have workarounds, just a minor inconvenience.
Contributor guide
Research direction
Reproduce the issue on Windows with a CRLF PULL_REQUEST_TEMPLATE.md, then trace the gh stack submit path that loads the template and opens the editor. Confirm the fix by checking that the template displays without extra line endings and that the existing workaround is no longer needed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- git, go
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100