Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-54048

Fetch single commit only

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Won't Fix
    • Icon: Minor Minor
    • git-plugin
    • None

      I use the shallow clone feature of the git plugin to reduce the size of the checked out repository. This works, but Git still checks out more data than needed, because it calls

      git fetch --no-tags --progress <URL> +refs/heads/:refs/remotes/origin/ --depth=<SHALLOW DEPTH>

      When the Git server has uploadpack.allowReachableSHA1InWant enabled, it would be possible to instead call

      git fetch --no-tags --progress <URL> <COMMIT HASH> --depth=<SHALLOW DEPTH>

      to only fetch the commit that currently gets compiled (and some history before it for computing the changelog).

      Would it be possible to add an option that does this? It would also be possible to do this if there was a way to insert the current commit hash into the refspec text, which I can already configure.

            Unassigned Unassigned
            saierd Daniel Saier
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: