git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Victor Engmark <victor@engmark.name>
To: git <git@vger.kernel.org>
Subject: RFC: Additional git-for-each-repo synopsis
Date: Wed, 17 Mar 2021 20:03:44 +1300	[thread overview]
Message-ID: <d327e1005e0d487c0c9e8e2f7a9ea17ed6036fce.camel@engmark.name> (raw)

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


                 reply	other threads:[~2021-03-17  7:04 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d327e1005e0d487c0c9e8e2f7a9ea17ed6036fce.camel@engmark.name \
    --to=victor@engmark.name \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).