summaryrefslogtreecommitdiff
path: root/Documentation/git-for-each-repo.txt
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2020-11-18 21:32:53 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-11-18 21:32:53 (GMT)
commit7660da161821ab79b8ecd5019c28843ed7e770a6 (patch)
treed0993b4af829e0275d6ff7cd0f87b17f69819b7c /Documentation/git-for-each-repo.txt
parentc042c455d4ffb9b5ed0c280301b5661f3efad572 (diff)
parent0016b618182f642771dc589cf0090289f9fe1b4f (diff)
downloadgit-7660da161821ab79b8ecd5019c28843ed7e770a6.zip
git-7660da161821ab79b8ecd5019c28843ed7e770a6.tar.gz
git-7660da161821ab79b8ecd5019c28843ed7e770a6.tar.bz2
Merge branch 'ds/maintenance-part-3'
Parts of "git maintenance" to ease writing crontab entries (and other scheduling system configuration) for it. * ds/maintenance-part-3: maintenance: add troubleshooting guide to docs maintenance: use 'incremental' strategy by default maintenance: create maintenance.strategy config maintenance: add start/stop subcommands maintenance: add [un]register subcommands for-each-repo: run subcommands on configured repos maintenance: add --schedule option and config maintenance: optionally skip --auto process
Diffstat (limited to 'Documentation/git-for-each-repo.txt')
-rw-r--r--Documentation/git-for-each-repo.txt59
1 files changed, 59 insertions, 0 deletions
diff --git a/Documentation/git-for-each-repo.txt b/Documentation/git-for-each-repo.txt
new file mode 100644
index 0000000..94bd19d
--- /dev/null
+++ b/Documentation/git-for-each-repo.txt
@@ -0,0 +1,59 @@
+git-for-each-repo(1)
+====================
+
+NAME
+----
+git-for-each-repo - Run a Git command on a list of repositories
+
+
+SYNOPSIS
+--------
+[verse]
+'git for-each-repo' --config=<config> [--] <arguments>
+
+
+DESCRIPTION
+-----------
+Run a Git command on a list of repositories. The arguments after the
+known options or `--` indicator are used as the arguments for the Git
+subprocess.
+
+THIS COMMAND IS EXPERIMENTAL. THE BEHAVIOR MAY CHANGE.
+
+For example, we could run maintenance on each of a list of repositories
+stored in a `maintenance.repo` config variable using
+
+-------------
+git for-each-repo --config=maintenance.repo maintenance run
+-------------
+
+This will run `git -C <repo> maintenance run` for each value `<repo>`
+in the multi-valued config variable `maintenance.repo`.
+
+
+OPTIONS
+-------
+--config=<config>::
+ Use the given config variable as a multi-valued list storing
+ absolute path names. Iterate on that list of paths to run
+ the given arguments.
++
+These config values are loaded from system, global, and local Git config,
+as available. If `git for-each-repo` is run in a directory that is not a
+Git repository, then only the system and global config is used.
+
+
+SUBPROCESS BEHAVIOR
+-------------------
+
+If any `git -C <repo> <arguments>` subprocess returns a non-zero exit code,
+then the `git for-each-repo` process returns that exit code without running
+more subprocesses.
+
+Each `git -C <repo> <arguments>` subprocess inherits the standard file
+descriptors `stdin`, `stdout`, and `stderr`.
+
+
+GIT
+---
+Part of the linkgit:git[1] suite