github / github/gh-stack

`gh stack submit` with PULL_REQUEST_TEMPLATE.md that has `CRLF` line endings

Ouverte
#384 2 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
bug topic: cli - submit
Langage dominant
Go
Étoiles
1.5k
Forks
70
Merge moyen
1 j 8 h
PR mergées (30 j)
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:

Image

It opens in the submit editor like this (each red mark is an extra newline):

Image

I replaced `CRLF` with `LF`, and then it works fine.

I have workarounds, just a minor inconvenience.

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

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.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
git, go
Domaine
cli
Type d'issue
Bug
Difficulté
3/5
Temps estimé
1-2 jours
Activité
Calme
Clarté
Plutôt claire
Accessibilité débutants
55/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.