Problems with commit message titles start with #

Abierto
#736 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
22/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
git, ruby
Área
devtools

Línea de trabajo

Start with the EmptyMessage commit-msg rule, since it rejects the commit once Git has stripped the #16: title. Reproduce by committing a message beginning with # under the default config, with core.commentchar set to ;, and with --cleanup=whitespace, and compare how Overcommit reads the message in each case. Done means a #-prefixed title is kept and not rejected as empty, while genuinely empty messages still fail.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

I'm facing this obscure issue that with commit message titles start with # (e.g. #16: This is a sample commit for the issue 16)

Behaviours:

Without Overcommit (or after overcommit --uninstall)

  • No problems with commit messages start with #

With Overcommit

  • With the default Git config
    • Git will clean up and strip the commit title, so it becomes empty
    • Then overcommit rejects it due to EmptyMessage rule (which is the correct behaviour of course)
  • With git config --global core.commentchar ';' set
    • Git still cleans up and strips the commit title with #, so it becomes empty again
    • Then overcommit ignores the empty message and doesn't reject the commit (even if EmptyMessage is enabled by default)
  • With git config --global commit.cleanup whitespace set
    • Maybe I'm doing something wrong here. Setting git commit.cleanup mode has no effect on anything. The commit message is still gone and overcommit is rejecting the empty message.
  • Use git commit -m "#16: This is a sample commit for the issue 16" --cleanup=whitespace
    • Same as above. No effect when it should.
Lenguaje dominante
Ruby
Estrellas
4k
Forks
288
Merge medio
2 d 4 h
PR fusionados (30 d)
18

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de sds/overcommit

Todos los issues de sds/overcommit

Issues similares

Más issues de Ruby

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.