You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+18-4Lines changed: 18 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -665,25 +665,39 @@ vcsrepo { '/path/to/repo':
665
665
666
666
####Checking out only specific paths
667
667
668
-
**Note:** The `includes` param is only supported when subversion client version is >= 1.6.
668
+
**Note:** The `includes` param is supported on all git clients, and subversion clients with version >= 1.6.
669
669
670
670
You can check out only specific paths in a particular repository by providing their relative paths to the `includes` parameter, like so:
671
671
672
-
~~~
672
+
~~~puppet
673
673
vcsrepo { '/path/to/repo':
674
674
ensure => present,
675
675
provider => svn,
676
676
source => 'http://svnrepo/hello/trunk',
677
677
includes => [
678
678
'root-file.txt',
679
+
'file/this-file.txt',
679
680
'checkout-folder',
681
+
'folder/this-folder/',
682
+
]
683
+
}
684
+
~~~
685
+
686
+
~~~puppet
687
+
vcsrepo { '/path/to/repo':
688
+
ensure => present,
689
+
provider => git,
690
+
source => 'git@example.com:project.git',
691
+
includes => [
692
+
'root-file.txt',
680
693
'file/this-file.txt',
694
+
'checkout-folder',
681
695
'folder/this-folder/',
682
696
]
683
697
}
684
698
~~~
685
699
686
-
This will create files `/path/to/repo/file-at-root-path.txt` and `/path/to/repo/file/nested/within/repo.jmx`, with folders `/path/to/repo/some-folder` and `/path/to/repo/nested/folder/to/checkout` completely recreating their corresponding working tree path.
700
+
This will create files `/path/to/repo/root-file.txt` and `/path/to/repo/file/this-file.txt`, with folders `/path/to/repo/checkout-folder` and `/path/to/repo/folder/this-folder/` completely recreating their corresponding working tree path.
687
701
688
702
When specified, the `depth` parameter will also be applied to the `includes` -- the root directory will be checked out using an `empty` depth, and the `includes` you specify will be checked out using the `depth` you provide.
*`depth` - Supports shallow clones in `git` or sets the scope limit in `svn`. (Available with `git` and `svn`.)
844
858
*`filesystem_types` - Supports multiple types of filesystem. (Available with `svn`.)
845
859
*`gzip_compression` - Supports explicit GZip compression levels. (Available with `cvs`.)
846
-
*`include_paths` - Lets you checkout only certain paths. (Available with `svn`.)
860
+
*`include_paths` - Lets you checkout only certain paths. (Available with `git` and `svn`.)
847
861
*`modules` - Lets you choose a specific repository module. (Available with `cvs`.)
848
862
*`multiple_remotes` - Tracks multiple remote repositories. (Available with `git`.)
849
863
*`reference_tracking` - Lets you track revision references that can change over time (e.g., some VCS tags and branch names). (Available with all providers)
0 commit comments