Title:
Current: Check to ensure all LFS files are committed and pushed, use drs (indexd) as system-of-record for file info
- PRO:
- clean separation of concerns
- CON:
- tags and meta data occur in different commit, push cycle than lfs files
- user training, adapt expectations of git workflow (tagging and meta data happens after file push)
Alternative: Check all git lfs added files are committed, add tags to local, temporary drs directory. Use combination of local drs directory and drs server info for tagging and metadata initialization
- PRO:
- tags and meta occur in same git workflow, no user expectation management/training
- CON:
- same logic spread across git-drs, add-tag, and meta init/validate
Description:
We should add a safeguard to prevent situations where Git LFS files are added but not properly committed or pushed. This can lead to broken DRS manifests, missing metadata, or confusing behavior for collaborators.
Current Solution:
Implement a script or pre-push CI check that verifies:
-
All LFS-tracked files that are added (git add) are also committed.
-
Detect staged but uncommitted LFS files using:
git lfs ls-files --cached
-
If any files are staged but not yet committed, block the [push, add-link, or meta init] and print a clear error.
-
All LFS-tracked files in commits are pushed to the remote.
- Use
git lfs status to detect LFS objects pending push.
- If any LFS objects are pending, block the
[add-link, or meta init] and print a clear warning.
Optional Enhancements:
-
Integrate this check into:
- Pre-push Git hook
- CI workflows (e.g., GitHub Actions)
-
Print helpful instructions if failures are detected (e.g., reminder to run git lfs push).
References:
Acceptance Criteria:
Title:
Current: Check to ensure all LFS files are committed and pushed, use drs (indexd) as system-of-record for file info
Alternative: Check all git lfs
addedfiles are committed, add tags to local, temporary drs directory. Use combination of local drs directory and drs server info for tagging and metadata initializationDescription:
We should add a safeguard to prevent situations where Git LFS files are added but not properly committed or pushed. This can lead to broken DRS manifests, missing metadata, or confusing behavior for collaborators.
Current Solution:
Implement a script or pre-push CI check that verifies:
All LFS-tracked files that are added (
git add) are also committed.Detect staged but uncommitted LFS files using:
If any files are staged but not yet committed, block the
[push, add-link, or meta init]and print a clear error.All LFS-tracked files in commits are pushed to the remote.
git lfs statusto detect LFS objects pending push.[add-link, or meta init]and print a clear warning.Optional Enhancements:
Integrate this check into:
Print helpful instructions if failures are detected (e.g., reminder to run
git lfs push).References:
git lfs ls-files --cachedgit lfs statusRelated Issues:
Acceptance Criteria: