.\" -*- 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 "Git::Raw::Submodule 3pm" .TH Git::Raw::Submodule 3pm 2024-03-07 "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 Git::Raw::Submodule \- Git submodule class .SH VERSION .IX Header "VERSION" version 0.90 .SH DESCRIPTION .IX Header "DESCRIPTION" \&\fBWARNING\fR: The API of this module is unstable and may change without warning (any change will be appropriately documented in the changelog). .SH METHODS .IX Header "METHODS" .ie n .SS "foreach( $repo, \e&callback )" .el .SS "foreach( \f(CW$repo\fP, \e&callback )" .IX Subsection "foreach( $repo, &callback )" Iterate over all tracked submodules of a repository. Calls \f(CW\*(C`\e&callback\*(C'\fR for each submodule. The callback receives a single argument, the name of the submodule. A non-zero return value will terminate the loop. .ie n .SS "lookup( $repo, $name )" .el .SS "lookup( \f(CW$repo\fP, \f(CW$name\fP )" .IX Subsection "lookup( $repo, $name )" Lookup submodule information by name or path. Returns a Git::Raw::Submodule object. .ie n .SS "init( $overwrite )" .el .SS "init( \f(CW$overwrite\fP )" .IX Subsection "init( $overwrite )" Just like "git submodule init", this copies information about the submodule into ".git/config". .SS "open( )" .IX Subsection "open( )" Open the repository for a submodule. Returns a Git::Raw::Repository object. .ie n .SS "update( $init, [\e%update_opts] )" .el .SS "update( \f(CW$init\fP, [\e%update_opts] )" .IX Subsection "update( $init, [%update_opts] )" Update a submodule. This will clone a missing submodule and checkout the subrepository to the commit specified in the index of the containing repository. If the submodule repository doesn't contain the target commit, then the submodule is fetched using the fetch options supplied in \f(CW\*(C`\e%update_opts\*(C'\fR. If the submodule is not initialized, setting the \f(CW$init\fR flag to true will initialize the submodule before updating. Otherwise, this method will thrown an exception if attempting to update an uninitialzed repository. .PP Valid fields for \f(CW%update_opts\fR are: .IP \(bu 4 "checkout_opts" .Sp See \f(CW\*(C`Git::Raw::Repository\->checkout()\*(C'\fR. .IP \(bu 4 "fetch_opts" .Sp See \f(CW\*(C`Git::Raw::Remote\->fetch()\*(C'\fR. .IP \(bu 4 "allow_fetch" .Sp Allow fetching from the submodule's default remote if the target commit isn't found. Enabled by default. .SS "name( )" .IX Subsection "name( )" Get the name of submodule. .SS "path( )" .IX Subsection "path( )" Get the path to the submodule. .SS "url( )" .IX Subsection "url( )" Get the URL of the submodule. .SS "add_to_index( )" .IX Subsection "add_to_index( )" Add current submodule HEAD commit to index of superproject. .SS "sync( )" .IX Subsection "sync( )" Copy submodule remote info into submodule repo. .SS "reload( )" .IX Subsection "reload( )" Reread submodule info from config, index, and HEAD. .SH AUTHOR .IX Header "AUTHOR" Jacques Germishuys .SH "LICENSE AND COPYRIGHT" .IX Header "LICENSE AND COPYRIGHT" Copyright 2019 Jacques Germishuys. .PP This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License. .PP See http://dev.perl.org/licenses/ for more information.