logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

Git::Raw::Submodule - Git submodule class

Author

       Jacques Germishuys <jacquesg@cpan.org>

Description

WARNING: The API of this module is unstable and may change without warning (any change will be
       appropriately documented in the changelog).

Methods

foreach($repo,\&callback)
       Iterate over all tracked submodules of a repository. Calls "\&callback" for each submodule.  The callback
       receives a single argument, the name of the submodule. A non-zero return value will terminate the loop.

   lookup($repo,$name)
       Lookup submodule information by name or path. Returns a Git::Raw::Submodule object.

   init($overwrite)
       Just like "git submodule init", this copies information about the submodule into ".git/config".

   open()
       Open the repository for a submodule. Returns a Git::Raw::Repository object.

   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 "\%update_opts". If the
       submodule is not initialized, setting the $init flag to true will initialize the submodule before
       updating. Otherwise, this method will thrown an exception if attempting to update an uninitialzed
       repository.

       Valid fields for %update_opts are:

       •   "checkout_opts"

           See "Git::Raw::Repository->checkout()".

       •   "fetch_opts"

           See "Git::Raw::Remote->fetch()".

       •   "allow_fetch"

           Allow  fetching  from  the  submodule's  default  remote if the target commit isn't found. Enabled by
           default.

   name()
       Get the name of submodule.

   path()
       Get the path to the submodule.

   url()
       Get the URL of the submodule.

   add_to_index()
       Add current submodule HEAD commit to index of superproject.

   sync()
       Copy submodule remote info into submodule repo.

   reload()
       Reread submodule info from config, index, and HEAD.

Name

       Git::Raw::Submodule - Git submodule class

Version

       version 0.90

See Also