Add support for GIT_CLONE_EXTRA_FLAGS for native git clone

What does this MR do?

This merge request introduces the GIT_CLONE_EXTRA_FLAGS variable, allowing users to pass extra arguments to the native git clone operation.

  • Adds support for GIT_CLONE_EXTRA_FLAGS in shell logic
  • Updates related tests to cover new functionality

Why was this MR needed?

Certain workflows require custom flags for git clone, such as referencing alternate repositories or optimizing clone performance. This change provides greater flexibility for advanced use cases.

What's the best way to test this MR?

To test native cloning with extra flags, set the following variables in your CI job:

variables:
  FF_USE_GIT_NATIVE_CLONE: true
  GIT_STRATEGY: clone
  GIT_CLONE_EXTRA_FLAGS: "--reference-if-available /tmp/test"

This ensures the runner uses the clone strategy and passes your custom flags to the native git clone command. You can adjust GIT_CLONE_EXTRA_FLAGS as needed for your test scenario.

What are the relevant issue numbers?

Edited by Axel von Bertoldi

Merge request reports

Loading