Skip to content

Commit 21c388d

Browse files
committed
Update Documentation / Examples for Git Includes
1 parent d6fb3df commit 21c388d

File tree

1 file changed

+18
-4
lines changed

1 file changed

+18
-4
lines changed

README.md

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -665,25 +665,39 @@ vcsrepo { '/path/to/repo':
665665

666666
####Checking out only specific paths
667667

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.
669669

670670
You can check out only specific paths in a particular repository by providing their relative paths to the `includes` parameter, like so:
671671

672-
~~~
672+
~~~ puppet
673673
vcsrepo { '/path/to/repo':
674674
ensure => present,
675675
provider => svn,
676676
source => 'http://svnrepo/hello/trunk',
677677
includes => [
678678
'root-file.txt',
679+
'file/this-file.txt',
679680
'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',
680693
'file/this-file.txt',
694+
'checkout-folder',
681695
'folder/this-folder/',
682696
]
683697
}
684698
~~~
685699

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.
687701

688702
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.
689703

@@ -843,7 +857,7 @@ Parameters: `basic_auth_password`, `basic_auth_username`, `configuration`, `conf
843857
* `depth` - Supports shallow clones in `git` or sets the scope limit in `svn`. (Available with `git` and `svn`.)
844858
* `filesystem_types` - Supports multiple types of filesystem. (Available with `svn`.)
845859
* `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`.)
847861
* `modules` - Lets you choose a specific repository module. (Available with `cvs`.)
848862
* `multiple_remotes` - Tracks multiple remote repositories. (Available with `git`.)
849863
* `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

Comments
 (0)