m . <job> doesn't clone git submodules and lacks git lfs support #1434

Open
opened 2025-05-26 15:01:43 +02:00 by Justinodactylus · 0 comments
Justinodactylus commented 2025-05-26 15:01:43 +02:00 (Migrated from github.com)

When running m . <job> to execute a job from the current repository's makes.nix, the framework clones the local repository into a temporary directory but fails to include git submodules and doesn't have git lfs available during the cloning process. This creates significant limitations for our projects that use git submodules and/or git lfs when trying to use makes for CI/CD tasks.

Expected Behavior

  1. When executing m . <job>, the command should clone the local repository along with all initialized git submodules
  2. Git LFS should be available during the cloning/copying process to handle LFS-tracked files properly

Current Behavior

  1. Only tracked and modified files from the main repository are copied to the temporary directory
  2. Git submodules are completely ignored and not included
  3. Git LFS is not available during the cloning process, causing failures with our repositories that have git hooks (e.g. post-checkout) and depend on git lfs

Steps to Reproduce

  1. Create a git repository with initialized submodules and/or git lfs tracked files
  2. Add a makes.nix file with a job definition
  3. Run m . <job>
  4. Observe that submodules are missing from the temporary directory
  5. If using git lfs with hooks, observe cloning failures due to missing git lfs

Suggested Fix

  1. Modify the repository cloning logic to include initialized submodule files when copying local repositories
  2. Ensure git lfs is available in the environment during the cloning/copying process
  3. Optional: Consider adding configuration options to control submodule cloning behavior if needed for performance reasons
When running `m . <job>` to execute a job from the current repository's `makes.nix`, the framework clones the local repository into a temporary directory but fails to include git submodules and doesn't have `git lfs` available during the cloning process. This creates significant limitations for our projects that use git submodules and/or git lfs when trying to use makes for CI/CD tasks. ## Expected Behavior 1. When executing `m . <job>`, the command should clone the local repository along with all initialized git submodules 2. Git LFS should be available during the cloning/copying process to handle LFS-tracked files properly ## Current Behavior 1. Only tracked and modified files from the main repository are copied to the temporary directory 2. Git submodules are completely ignored and not included 3. Git LFS is not available during the cloning process, causing failures with our repositories that have git hooks (e.g. post-checkout) and depend on git lfs ## Steps to Reproduce 1. Create a git repository with initialized submodules and/or git lfs tracked files 2. Add a `makes.nix` file with a job definition 3. Run `m . <job>` 4. Observe that submodules are missing from the temporary directory 5. If using git lfs with hooks, observe cloning failures due to missing git lfs ## Suggested Fix 1. Modify the repository cloning logic to include initialized submodule files when copying local repositories 2. Ensure git lfs is available in the environment during the cloning/copying process 3. *Optional*: Consider adding configuration options to control submodule cloning behavior if needed for performance reasons
This discussion has been locked. Commenting is limited to contributors.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
justin/makes#1434
No description provided.