.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Dist::Zilla::Plugin::Git::GatherDir 3pm" .TH Dist::Zilla::Plugin::Git::GatherDir 3pm 2024-01-20 "perl v5.38.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME Dist::Zilla::Plugin::Git::GatherDir \- Gather all tracked files in a Git working directory .SH VERSION .IX Header "VERSION" version 2.049 .SH SYNOPSIS .IX Header "SYNOPSIS" In your \fIdist.ini\fR: .PP .Vb 7 \& [Git::GatherDir] \& root = . ; this is the default \& prefix = ; this is the default \& include_dotfiles = 0 ; this is the default \& include_untracked = 0 ; this is the default \& exclude_filename = dir/skip ; there is no default \& exclude_match = ^local_ ; there is no default .Ve .SH DESCRIPTION .IX Header "DESCRIPTION" This is a trivial variant of the GatherDir plugin. It looks in the directory named in the "root" attribute and adds all the Git tracked files it finds there (as determined by \f(CW\*(C`git ls\-files\*(C'\fR). If the root begins with a tilde, the tilde portion is passed through \f(CWglob()\fR first. .PP Most users just need: .PP .Vb 1 \& [Git::GatherDir] .Ve .PP \&...and this will pick up all tracked files from the current directory into the dist. You can use it multiple times, as you can any other plugin, by providing a plugin name. For example, if you want to include external specification files into a subdir of your dist, you might write: .PP .Vb 2 \& [Git::GatherDir] \& ; this plugin needs no config and gathers most of your files \& \& [Git::GatherDir / SpecFiles] \& ; this plugin gets all tracked files in the root dir and adds them under ./spec \& root = ~/projects/my\-project/spec \& prefix = spec .Ve .SH ATTRIBUTES .IX Header "ATTRIBUTES" This plugin inherits attributes from Dist::Zilla::Plugin::GatherDir, with the following modifications: .SS root .IX Subsection "root" See "root" in Dist::Zilla::Plugin::GatherDir. It does not need to be the root of a Git repository, but it must be inside a repository. .SS include_untracked .IX Subsection "include_untracked" By default, files not tracked by Git will not be gathered. If this is set to a true value, then untracked files not covered by a Git ignore pattern (i.e. those reported by \f(CW\*(C`git ls\-files \-o \-\-exclude\-standard\*(C'\fR) are also gathered (and you'll probably want to use Git::Check to ensure all files are checked in before a release). .PP \&\f(CW\*(C`include_untracked\*(C'\fR requires at least Git 1.5.4, but you should probably not use it if your Git is older than 1.6.5.2. Versions before that would not list files matched by your \fI.gitignore\fR, even if they were already being tracked by Git (which means they will not be gathered, even though they should be). Whether that is a problem depends on the contents of your exclude files (including the global one, if any). .SS follow_symlinks .IX Subsection "follow_symlinks" Git::GatherDir does not honor GatherDir's follow_symlinks option. While the attribute exists (because Git::GatherDir is a subclass), setting it has no effect. .PP Directories that are symlinks will not be gathered. Instead, you'll get a message saying \f(CW\*(C`WARNING: %s is symlink to directory, skipping it\*(C'\fR. To suppress the warning, add that directory to \f(CW\*(C`exclude_filename\*(C'\fR or \&\f(CW\*(C`exclude_match\*(C'\fR. To gather the files in the symlinked directory, use a second instance of GatherDir or Git::GatherDir with appropriate \&\f(CW\*(C`root\*(C'\fR and \f(CW\*(C`prefix\*(C'\fR options. .PP Files which are symlinks are always gathered. .SH SUPPORT .IX Header "SUPPORT" Bugs may be submitted through the RT bug tracker (or bug\-Dist\-Zilla\-Plugin\-Git@rt.cpan.org ). .PP There is also a mailing list available for users of this distribution, at . .PP There is also an irc channel available for users of this distribution, at \&\f(CW\*(C`#distzilla\*(C'\fR on \f(CW\*(C`irc.perl.org\*(C'\fR . .SH AUTHOR .IX Header "AUTHOR" Jerome Quelin .SH "COPYRIGHT AND LICENCE" .IX Header "COPYRIGHT AND LICENCE" This software is copyright (c) 2009 by Jerome Quelin. .PP This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.