Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
JENKINS-24728 Added UI Elements for shallow clone depth
Use @DataBoundSetter instead of extending the constructor as was done in the original pull request. The DataBoundSetter annotation simplifies the change. Original concept by Nicholas Jasieniecki, with changes by Mark Waite. Add help to shallow clone depth setting. Add shallow and shallow depth to fetch command options. The previous implementation only set depth on the clone arguments, not on the fetch arguments. Without the depth on the fetch arguments, fetch retrieves history additively, rather than retaining the depth at the originally specified value. That caused the history in a repository which is being reused to grow each time new commits are detected and built by the job. This change now keeps the history at the specified depth even with incremental updates of the repository by new commits.
- Loading branch information
1 parent
2553827
commit d96318d
Showing
3 changed files
with
27 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
src/main/resources/hudson/plugins/git/extensions/impl/CloneOption/help-depth.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<div> | ||
Set shallow clone depth, so that git will only download recent history of the project, | ||
saving time and disk space when you just want to access the latest version of a repository. | ||
</div> |