Define clone depth per pipeline

Issue #18006 open
Ihor Sviziev created an issue

We're using feature clone depth only for one specific custom pipeline. There only a way to configure this parameter globally, as result - for all other pipelines we have longer clone process.

I suggest to add ability define or override value of clone depth on pipeline level.

Comments (6)

  1. aneita staff
    • changed status to open

    Hi @ihor_sviziev,

    Thanks for reaching out and for the suggestion. I can see why this would be a useful option to have.

    Given our current priorities, this is unlikely to be something we support in the short term. In the meantime however, I'll open this ticket to gauge the interest of other users in seeing the same functionality.


  2. Sasa Jovanovic

    Here's the workaround until this issue will be resolved.

    - step:
        - git fetch --unshallow
        - git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*"
        - git fetch origin
        - git checkout --track origin/master

    I've found this on the link

  3. Sasa Jovanovic

    @ozbek I've first tried your solution, but it doesn't work for me


    After some research, I've found the root cause. I run pipelines from develop branch. In that case, clone command look like this

    GIT_LFS_SKIP_SMUDGE=1 git clone --branch="develop" --depth 50 https...

    On the link I've mentioned before, you can find the comment where Peter Cordes said This doesn't undo the --single-branch side effect.

    That's why I need a solution from the link

  4. Log in to comment