[ https://issues.apache.org/jira/browse/SCM-739?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16262818#comment-16262818 ]
ASF GitHub Bot commented on SCM-739: ------------------------------------ GitHub user arteam opened a pull request: https://github.com/apache/maven-scm/pull/56 [SCM-739] Use shallow clones when cloning a git repo For `maven-release-plugin` we don't need the whole history, but only the top commit. Using `--depth 1` allows to perform releases much faster on repositories with a long history. You can merge this pull request into a Git repository by running: $ git pull https://github.com/arteam/maven-scm git-clone-shallow Alternatively you can review and apply these changes as the patch at: https://github.com/apache/maven-scm/pull/56.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #56 ---- commit c041868bf8c543cecb34c8f002f02438e6f81b52 Author: Artem Prigoda <artea...@gmail.com> Date: 2017-11-22T15:52:00Z [SCM-739] Use shallow clones when cloning a git repo For `maven-release-plugin` we don't need the whole history, but only the top commit. Using `--depth 1` allows to perform releases much faster on repositories with a long history. ---- > Release Plugin: Use "git --depth 1" When Checking Out > ----------------------------------------------------- > > Key: SCM-739 > URL: https://issues.apache.org/jira/browse/SCM-739 > Project: Maven SCM > Issue Type: Improvement > Components: maven-scm-provider-gitexe > Affects Versions: 1.8.1 > Reporter: Ernst de Haan > > *Executive summary: Please use {{--depth 1}} when checking out from a git > repository.* > Currently when doing {{mvn release:prepare release:perform}}, the git > checkout step takes a significant amount of time. > During the git checkout it appears to not only check out the correct version > of the code, but also _all_ history, as would be done with a regular: > {code:none}git clone URL{code} > However, git supports checking out only the latest version of the code base, > using this command: {code:none}git clone --depth 1 URL{code} > For the purpose of the Maven Release Plugin, that should be sufficient, as > far as I can see. > Changing the plugin to use {{--depth 1}} will: > - _significantly_ improve performance on larger repositories and/or with a > lot of history > - and reduce I/O on repositories with a lot of history. -- This message was sent by Atlassian JIRA (v6.4.14#64029)