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 the current directory (or in the
13 directory given by the "GIT_DIR" environment variable if it's set) for
14 all git repositories, sort this list by the repository path, "chdir"
15 into each of them, and executes the specified git command. Moreover,
16 those formats are substuted in the arguments before running the command
19 * "^n" with the current repository name.
21 * "^g" with the relative path to the current repository.
23 * "^G" with the absolute path to the current repository.
25 * "^w" with the relative path to the current repository's working
28 * "^W" with the absolute path to the current repository's working
31 * "^b" with a "bareified" relative path, i.e. "^g" if this is a bare
32 repository, and "^w.git" otherwise.
34 * "^B" with an absolute version of the "bareified" path.
36 * "^R" with the absolute path to the current root directory.
38 * "^^" with a bare "^".
40 There are actually a few commands that are only executed once in the
41 current directory : "daemon", "gui", "help", "init" and "version". For
42 any of those, no format substitution is done.
44 You can specify which "git" executable to use with the "GIT_EXEC_PATH"
48 "rgit" takes its options as the capital switches that comes before the
49 git command. It's possible to bundle them together. They are removed
50 from the argument list before calling "git".
54 Keep processing on error. The default policy is to stop whenever an
59 Enables interactive mode when the standard input is a tty. Requires
60 Term::ReadKey to be installed. This lets you choose interactively
61 what to do when one of the commands returns a non-zero status.
72 Execute "git gc" on all the repositories below the current directory :
76 Tag all the repositories with their name :
80 Add a remote to all repositories in "/foo/bar" to their bare counterpart
83 GIT_DIR="/foo/bar" rgit remote add host git://host/qux/^b
86 The core modules Carp, Config, Cwd, Exporter, File::Find,
87 File::Spec::Functions and POSIX.
92 Vincent Pit, "<perl at profvince.com>", <http://profvince.com>.
94 You can contact me by mail or on "irc.perl.org" (vincent).
97 Please report any bugs or feature requests to "bug-rgit at rt.cpan.org",
98 or through the web interface at
99 <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=rgit>. I will be
100 notified, and then you'll automatically be notified of progress on your
101 bug as I make changes.
104 You can find documentation for this module with the perldoc command.
108 Tests code coverage report is available at
109 <http://www.profvince.com/perl/cover/rgit>.
112 Copyright 2008 Vincent Pit, all rights reserved.
114 This program is free software; you can redistribute it and/or modify it
115 under the same terms as Perl itself.