2 rgit - Recursively execute a command on all the git repositories in a
9 rgit [-K|-I|-D|-V] [GIT_OPTIONS] COMMAND [COMMAND_ARGS]
12 This utility recursively searches in a root directory (which may be the
13 current working directory or - if it has been set - the directory given
14 by the "GIT_DIR" environment variable) for all git repositories, sort
15 this list by the repository path, "chdir" into each of them, and
16 executes the specified git command. Moreover, those formats are
17 substituted in the arguments before running the command :
19 * %n with the current repository name.
21 * %g with the relative path (based from the root directory) to the
24 * %G with the absolute path to the current repository.
26 * %w with the relative path (based from the root directory) to the
27 current repository's working directory.
29 * %W with the absolute path to the current repository's working
32 * %b with a "bareified" relative path, i.e. %g if this is a bare
33 repository, and "%w.git" otherwise.
35 * %B with an absolute version of the "bareified" path.
37 * %R with the absolute path to the root directory.
39 * "%%" with a bare "%".
41 There are actually a few commands that are only executed once in the
42 root directory : "daemon", "gui", "help", "init" and "version". For any
43 of those, no format substitution is done.
45 You can specify which "git" executable to use with the "GIT_EXEC_PATH"
49 "rgit" takes its options as the capital switches that comes before the
50 git command. It's possible to bundle them together. They are removed
51 from the argument list before calling "git".
55 Keep processing on error. The default policy is to stop whenever an
60 Enables interactive mode when the standard input is a tty. Requires
61 Term::ReadKey to be installed. This lets you choose interactively
62 what to do when one of the commands returns a non-zero status.
73 Execute "git gc" on all the repositories below the current directory :
77 Tag all the repositories with their name :
81 Add a remote to all repositories in "/foo/bar" to their bare counterpart
84 GIT_DIR="/foo/bar" rgit remote add host git://host/qux/%b
87 The core modules Carp, Config, Cwd, Exporter, File::Find,
88 File::Spec::Functions and POSIX.
93 Vincent Pit, "<perl at profvince.com>", <http://profvince.com>.
95 You can contact me by mail or on "irc.perl.org" (vincent).
98 Please report any bugs or feature requests to "bug-rgit at rt.cpan.org",
99 or through the web interface at
100 <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=rgit>. I will be
101 notified, and then you'll automatically be notified of progress on your
102 bug as I make changes.
105 You can find documentation for this module with the perldoc command.
109 Tests code coverage report is available at
110 <http://www.profvince.com/perl/cover/rgit>.
113 Copyright 2008-2009 Vincent Pit, all rights reserved.
115 This program is free software; you can redistribute it and/or modify it
116 under the same terms as Perl itself.