Skip to content

LFS support#7

Merged
ardiloot merged 2 commits intomainfrom
git-fixes
Mar 17, 2026
Merged

LFS support#7
ardiloot merged 2 commits intomainfrom
git-fixes

Conversation

@ardiloot
Copy link
Copy Markdown
Owner

This pull request adds comprehensive support for Git LFS (Large File Storage) to the pubgate tool, enabling proper handling of LFS-tracked files throughout all pipelines. The changes include auto-detection of LFS, seamless integration of LFS fetch/push operations during absorb and publish, and improved file classification to distinguish between text, binary, and LFS pointer files. Documentation is updated to reflect these enhancements and clarify edge cases.

Git LFS support and integration:

  • Implemented LFS pointer detection via the new is_lfs_pointer function and integrated it into file classification logic (pubgate/git.py). LFS files are now distinguished from regular binaries and handled accordingly. [1] [2] [3] [4] [5]
  • Added LFS fetch and push operations to absorb, publish, and initialization workflows, ensuring LFS objects are synchronized with remotes automatically if LFS is installed (pubgate/core.py). [1] [2] [3] [4] [5]
  • Introduced new methods in GitRepo for LFS availability detection, fetch, and push, with logging and silent skipping if LFS is not installed (pubgate/git.py).

File handling improvements:

  • Refactored file staging and merging logic to use explicit newline handling and robust classification, preventing accidental merging or scrubbing of LFS pointer files (pubgate/git.py, pubgate/absorb.py). [1] [2] [3] [4]
  • Updated stage snapshot logic to skip scrubbing for LFS pointer files and track them separately (pubgate/stage_snapshot.py). [1] [2] [3]

Documentation updates:

  • Expanded README and SPEC documentation to describe LFS support, limitations, and edge cases, including guidance for .gitattributes and handling of sensitive LFS files (README.md, SPEC.md). [1] [2] [3]

These changes ensure that repositories using Git LFS are handled safely and efficiently, with clear user guidance and robust integration throughout the pubgate workflow.

@ardiloot ardiloot merged commit 77e7541 into main Mar 17, 2026
3 of 4 checks passed
@ardiloot ardiloot deleted the git-fixes branch March 17, 2026 21:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant