fw git commit validates only the last -m fragment, refusing the conventional subject/body/trailer form

Abierto Apto para principiantes
#51 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
78/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
shell
Área
cli

Línea de trabajo

Lee agents/git/lib/commit.sh:39-95 para seguir cómo se analizan los argumentos -m repetidos y, después, inspecciona la línea 143, donde extract_task_id recibe el mensaje. Compara el tratamiento del parser con la unión de varios fragmentos mediante líneas en blanco de Git. Se considera terminado cuando se acepta una referencia de tarea en un asunto o cuerpo con argumentos -m repetidos; en la issue no se nombra ningún archivo de pruebas.

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

Descripción

fw git commit extracts the task reference from only the last -m fragment, so the
conventional multi-paragraph form is refused:

fw git commit -m "T-NNNN: repair the glossar adapter" \
              -m "Longer explanation..." \
              -m "Co-Authored-By: Claude ..."
ERROR: No task reference found in commit message

The error quotes the trailer back, which is the only part it looked at.

Code path

agents/git/lib/commit.sh:39-95 — the argument parser has -m) message="$2" with no
accumulation, so each repeated -m overwrites the previous one. Line 143 then runs
extract_task_id "$message" against whatever survived, i.e. the last fragment.

Confirmed still present on 1.6.769.

Why it bites

git itself joins repeated -m fragments with blank lines, so this is the standard way to
write subject/body/trailer. It bites hardest in projects where an attribution trailer is
mandatory on every commit — there, the last fragment is always the trailer, so the
conventional form never works and every commit must be built as a single -m with embedded
newlines via printf.

Suggested fix

Either concatenate the fragments the way git does before extracting, or test the first
fragment, which is the subject and is where a task reference conventionally lives.
Concatenating is strictly better: it also accepts a reference that legitimately appears in
the body.

Filed from project 1409-sprind under its observation-inbox triage task, confirmed by
reading the parser rather than by re-running the original repro.

Lenguaje dominante
Shell
Estrellas
16
Forks
6
Métricas de merge de PR
Sin PR fusionados en 30 d

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 DimitriGeelen/agentic-engineering-framework

Todos los issues de DimitriGeelen/agentic-engineering-framework

Issues similares

Más issues de Shell/Bash

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.