Git::R...bmodule(3pm)

πŸ’– Git::Raw::Submodule β€” the man page, but make it cute πŸ’–

okay so bestie, you opened the manual named Git::R...bmodule(3pm) and it's literally the docs for Git::Raw::Submodule, which is the submodule class in Git::Raw. it's giving "tiny class, big feelings". let's get into it πŸ¦‹


✨ VERSION ✨

version 0.90 β€” that's the number, no cap, memorize it πŸ’…


🌸 DESCRIPTION 🌸

WARNING: the API of this module is unstable and may change without warning. not me being dramatic β€” that's literally what it says. any change will be appropriately documented in the changelog, so like… track the changelog, bestie. πŸ“Œ

πŸŽ€ METHODS πŸŽ€

foreach( $repo, \&callback )

iterate over all tracked submodules of a repository. it calls \&callback for each and every one of them, no skips. the callback receives a single argument β€” the name of the the submodule β€” and if it returns a non-zero value, the loop gets terminated. bye. πŸšͺ


lookup( $repo, $name )

look up submodule info by name or path. returns a Git::Raw::Submodule object. πŸ‘‘


init( $overwrite )

just like git submodule init. it copies info about the submodule into .git/config. it's giving "move-in day" 🏠


open( )

open the repository for a submodule. returns a Git::Raw::Repository object. 🫢


update( $init, [\%update_opts] )

update a submodule, bestie. here's the tea:

  • it will clone a missing submodule
  • and it'll checkout the subrepository to the commit specified in the index of the containing repository πŸ“¦

and if the submodule repository doesn't contain the target commit? then the submodule gets fetched using the fetch options you supplied in \%update_opts.

and if the submodule is not initialized, setting the $init flag to true will initialize the submodule before updating. otherwise β€” and this is the important part β€” this method will throw an exception if you try to update an uninitialized repository. so like, don't do that 😭

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 the submodule. that's it. that's the whole method. iconic. πŸ’…


path( )

get the path to the submodule. 🌈


url( )

get the URL of the submodule. πŸ”—


add_to_index( )

add the current submodule HEAD commit to the index of the superproject. ⭐


sync( )

copy the submodule remote info into the submodule repo. synchronizing, baby ✨


reload( )

reread the submodule info from config, index, and HEAD. it's giving "vibe check refresh" πŸ”„


πŸ‘‘ AUTHOR πŸ‘‘

Jacques Germishuys <jacquesg@cpan.org>


Copyright 2019 Jacques Germishuys.

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.

See http://dev.perl.org/licenses/ for more information.


and that's the whole page, bestie!! no notes, 10/10, would commit again. πŸŽ€ this was perl v5.42.3, dated 2026-08-19, from the manual page Git::R...bmodule(3pm) β€” drink some water, go git submodule update, and slay πŸ’–βœ¨πŸ¦‹

πŸ“¦ where this page comes from