github GitoxideLabs/gitoxide gix-attributes-v0.35.0
gix-attributes v0.35.0

one hour ago

Test

  • cover reserved-namespace boundaries in attribute files
    Adds the cases not covered by #2883: that builtin_ is checked after -/!
    are stripped, and that near-miss names like builtin and x_builtin_y stay
    accepted so only the exact prefix is reserved.

Bug Fixes

  • match Git's attribute syntax validation

    Git rejects empty attribute names and reserves builtin_* for definitions in
    attribute files, while still allowing that namespace for queries and pathspec
    matching. It also treats a bare [attr] token as a pattern instead of a macro
    declaration.

    Centralize ordinary name validation and apply the reserved namespace only to
    attribute-file definitions.

    Git baseline: git 2.50.1 and /Users/byron/dev/github.com/git/git at cf5497b14c,
    notably attr.c parse_attr_line()/attr_name_reserved().

  • split attributes on ASCII blanks only, and reject empty names, like in Git.

Changed (BREAKING)

  • fall back to the raw text when unquoting fails.
    Both callers of gix_quote::ansi_c::undo() turned a failure into an error of
    their own, while Git keeps the raw, still-quoted token as the value:

    • parse_attr_line() in attr.c falls through to its unquoted branch
    • Git's alternates parsing in odb.c spells the unterminated case out in a
      comment of its own

    For attributes this also covers invalid escapes, which were previously a hard
    error for the whole line. Git keeps "\!x" as the pattern, where the backslash
    goes on to escape the ! for the matcher rather than negating the pattern.

    Both fall back before checking for the [attr] macro prefix, as Git does, so a
    line like "[attr]x stays a pattern on either side.

    The Unquote variants are unreachable now and have been removed.

Commit Statistics

  • 17 commits contributed to the release over the course of 30 calendar days.
  • 30 days passed between releases.
  • 4 commits were understood as conventional.
  • 0 issues like '(#ID)' were seen in commit messages

Commit Details

view details
  • Uncategorized
    • Update manifests prior to release (ebe9095)
    • Merge pull request #2905 from GitoxideLabs/various-improvements (f3bbfad)
    • Adapt to changes in gix-testtools (0cbe539)
    • Merge pull request #2891 from ameyypawar/quote-unterminated (6fc3e04)
    • Review (76f9643)
    • Fall back to the raw text when unquoting fails. (253edde)
    • Merge pull request #2884 from ameyypawar/attrs-builtin-namespace (e894110)
    • Review (eca8d1a)
    • Cover reserved-namespace boundaries in attribute files (a44969c)
    • Merge pull request #2883 from GitoxideLabs/attributes-correctness (33058e8)
    • Match Git's attribute syntax validation (95dcab6)
    • Merge pull request #2865 from shuvamk/fix/attributes-git-tokenisation (f101ab6)
    • Review (c3b6e05)
    • Split attributes on ASCII blanks only, and reject empty names, like in Git. (d06b8ed)
    • Merge pull request #2867 from GitoxideLabs/fix-url-authority-parsing (cc3ee80)
    • Release gix-path v0.12.4, gix-command v0.9.2, gix-config-value v0.19.1, gix-url v0.37.1, gix-credentials v0.39.1, gix-transport v0.58.1 (ab4fcb0)
    • Merge pull request #2812 from GitoxideLabs/report-july (ae8845a)

Don't miss a new gitoxide release

NewReleases is sending notifications on new releases.