Add shallow option to ecbuild_bundle#146
Open
mcakircali wants to merge 8 commits into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a SHALLOW option to the bundle/git helper macros to support shallow checkouts (depth 1) and shallow submodule initialisation, reducing clone time and bandwidth for bundled projects.
Changes:
- Extend
ecbuild_git()with aSHALLOWoption to add--depth 1to initial clones and optionally submodule updates. - Update
ecbuild_git()behaviour to avoid fetch/pull operations whenSHALLOWis enabled. - Document the new
SHALLOWoption inecbuild_gitandecbuild_bundle.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| cmake/ecbuild_git.cmake | Implements SHALLOW cloning/submodule depth logic and adjusts fetch/pull behaviour. |
| cmake/ecbuild_bundle.cmake | Documents the new SHALLOW option for bundle users (forwarded to ecbuild_git). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds a SHALLOW flag to ecbuild_git and ecbuild_bundle.
When SHALLOW is specified, initial checkouts use
git clone --depth 1. If a specific BRANCH or TAG is combined with SHALLOW, it instructs Git to only clone that specific branch/tag (--branch ).When combined with the RECURSIVE option, submodules are also initialized and updated using the
--depth 1flag.NOTE:
Because Git cannot shallow clone a commit ID directly, SHALLOW will cause to throw if the TAG matches the pattern of a Git commit hash (SHA).
TAG <commit_hash> SHALLOW -> this will throw
TAG <tag_name> SHALLOW -> this will work
Contributor Declaration
By opening this pull request, I affirm the following: