Skip to content

Commit Header Length Exception for Reverts #61

@javier-godoy

Description

@javier-godoy

Currently, our Commit Message Guidelines contain a logical contradiction when handling reverts.

  • The length of the header line (including type and scope) must be less than 72 characters [1].
  • A revert commit must use the prefix revert: , followed by the full header of the original commit, e.g.: revert: chore: update README.md. [2]

Problem

When a developer reverts a commit that was already at or near the 72-character limit, the mandatory revert: prefix (8 characters including the space) pushes the new header to 80 characters, violating the first rule.

Example

Original Commit (72 characters):

fix: set value to 901234567890123456789012345678901234567890123456789012

Revert Commit (80 characters):

revert: fix: set value to 901234567890123456789012345678901234567890123456789012

Proposal

Commits using the revert: type are permitted to exceed the 72-character limit, up to a maximum of 80 characters. This allows for the inclusion of the full original header without truncation

Metadata

Metadata

Assignees

No one assigned

    Labels

    discussThe issue is scheduled for internal discussion

    Type

    No type

    Projects

    Status

    Inbox (needs triage)

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions