ref:main

feat: .gitattributes evaluation for a given path #49

open Opened by cole.christensen@gmail.com

Links

No links yet.

Several features (LFS pointer detection, merge strategies, eol normalization, diff tooling) need to evaluate .gitattributes rules for a path relative to a tree.

Scope

  • Attributes.lookup(repo, tree_sha, path) :: %{String.t() => String.t() | true | false}
  • Walk .gitattributes files up the tree from the path; honor .git/info/attributes as a fallback slot (caller provides it).
  • Handle pattern syntax (globs, negation, !unset, set, unspecified).

Acceptance

  • Matches git check-attr -a <path> output on a fixture with nested .gitattributes and negations.

Unblocks: LFS-aware diff rendering, server-side merge driver selection, eol handling.