pre-commit / pre-commit/pre-commit-hooks

Proposal: new hook to detect LFS attribute inconsistencies

Open
#1,020 8 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
6.7k
Forks
800
PR merge metrics
No merged PRs in 30d

Description

There are two common errors when working with LFS:

  • Keeping files as general objects after setting LFS attributes (LFS produces a warnings like "Encountered 1 file(s) that should have been pointers, but weren't")
  • Keeping LFS pointers after removing the attributes.

Proposed implementation of a check-lfs-attributes hook: https://github.com/klimkin/pre-commit-hooks/tree/feature/check-lfs-attributes

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 by reviewing the proposed check-lfs-attributes implementation at the linked branch, then compare it with the repository's existing hook patterns. Verify both reported cases: tracked files that should be LFS pointers and LFS pointers whose attributes were removed; done means the hook detects each inconsistency reliably.

Written by the indexing model from the issue text.

Assessment

Tech stack
git, python
Domain
tooling
Issue type
Feature
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.