Skip to content

Improve shallow clone#148

Merged
marcosbento merged 9 commits into
developfrom
feature/shallow-clone-improvements
Jun 8, 2026
Merged

Improve shallow clone#148
marcosbento merged 9 commits into
developfrom
feature/shallow-clone-improvements

Conversation

@marcosbento

@marcosbento marcosbento commented Jun 2, 2026

Copy link
Copy Markdown
Collaborator

Description

Add more and improve existing tests, improve documentation, and improve debug/info message...

Contributor Declaration

By opening this pull request, I affirm the following:

  • All authors agree to the Contributor License Agreement.
  • The code follows the project's coding standards.
  • I have performed self-review and added comments where needed.
  • I have added or updated tests to verify that my changes are effective and functional.
  • I have run all existing tests and confirmed they pass.

@marcosbento marcosbento force-pushed the feature/shallow-clone-improvements branch 4 times, most recently from 33556e0 to 76e9e24 Compare June 2, 2026 11:19
@marcosbento marcosbento requested a review from mcakircali June 2, 2026 11:24
For correct handling on submodules, the option needs to be provided
globally. In order to not pollute the CI environment, a temporary HOME
is used to deploy a .gitconfig.
@marcosbento marcosbento force-pushed the feature/shallow-clone-improvements branch from 76e9e24 to df72cbb Compare June 2, 2026 12:34

@mcakircali mcakircali left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me. just be sure of the change from warn to critical.

Comment thread cmake/ecbuild_git.cmake
endif()

if( _PAR_UPDATE AND _PAR_SHALLOW )
ecbuild_warn("UPDATE and SHALLOW conflict — shallow clones aren't switchable; UPDATE may be ignored or fail.")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ecbuild_critical fails? if yes, this changes the behavior, not just a log change as in PR desc. if it's intentional, it's fine.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi.

I was just following the documentation above, which stated: SHALLOW is not switchable and will fail if UPDATE is requested on an existing shallow clone.
Given the inconsistency between implementation and documentation, I decided to err on the side of caution and fail clearly and as early as possible.

@marcosbento marcosbento merged commit 0f5548c into develop Jun 8, 2026
331 checks passed
@marcosbento marcosbento deleted the feature/shallow-clone-improvements branch June 8, 2026 09:37
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.

2 participants