git/list[1] front-page[2] threads[3] people[4] search[5] about
 

RFC: Additional git-for-each-repo synopsis

From
Victor Engmark <victor@engmark.name>
Date
Mar 17, 2021, 07:03 UTC
Message-ID
<d327e1005e0d487c0c9e8e2f7a9ea17ed6036fce.camel@engmark.name>
Hi all

git-for-each-repo is similar to a tool I wrote over a decade ago and have been using ever since, `fgit` <https://gitlab.com/victor-engmark/fgit/-/blob/master/fgit.sh>.  Looking at the git-for-each-repo documentation it seems it's doing things very differently, and I'm wondering if you would be interested in an additional synopsis for the same command:

git for-each-repo <arguments> -- <directories>

For example, `git for-each-repo fetch -- ~/*/` would fetch in each directory directly underneath the home directory. If some of the directories are not repositories it can easily be amended to `~/*/.git/..`, which is going to match only actual Git repositories on sane systems. This is similar to the command I run every day or so, `fgit pull -- ~/*/.git/.. ~/dev/*/.git/.. "/run/media/${USER}"/*/*/.git/..`.

This means not having to configure anything to use this tool. The overhead of dealing with a configuration file is significant, especially for beginners. It also means not having to go through several steps every time my collection of repositories changes (approximately weekly to monthly), and either coming up with some hack for injecting all my repos into that configuration or forever second- guessing whether the configuration is up to date. A third advantage is that this would make it possible to use relative paths.

Cheers Victor

Message 1 of 1 in “RFC: Additional git-for-each-repo synopsis”
  1. Victor EngmarkMar 17, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.