libgit2 / libgit2/rugged

Taking into account default git attributes with fetch_attributes()

Open
#765 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
2.3k
Forks
293
PR merge metrics
No merged PRs in 30d

Description

Rugged doesn't seem to aknowledge core.attributesFile (falling back to $HOME/.config/git/attributes) or $(prefix)/etc/gitattributes as specified in the docs when fetching attributes for a path with repo.fetch_attributes(path).

git check-attr handles that so this is either on Rugged side or libgit2 (against which I don't have the competence to test).

(related to https://github.com/github/linguist/issues/4283)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the Rugged implementation of repo.fetch_attributes(path) and compare its attribute lookup with git check-attr and the linked gitattributes documentation. Trace whether the behavior belongs in Rugged or libgit2; done means core.attributesFile, $HOME/.config/git/attributes, and $(prefix)/etc/gitattributes are honored when fetching attributes.

Written by the indexing model from the issue text.

Assessment

Tech stack
git, ruby
Domain
devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.