From: Junio C Hamano <gitster@pobox.com>
To: Lars Hjemli <hjemli@gmail.com>
Cc: Jonathan Nieder <jrnieder@gmail.com>, git@vger.kernel.org
Subject: Re: [PATCH v4 1/2] for-each-repo: new command used for multi-repo operations
Date: Mon, 28 Jan 2013 10:51:22 -0800 [thread overview]
Message-ID: <7vr4l5w385.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <CAFXTnz6xBMo42jWdqahYX-bnTBucVmQpFPN29X8tGRd7L=g2wQ@mail.gmail.com> (Lars Hjemli's message of "Mon, 28 Jan 2013 19:35:21 +0100")
Lars Hjemli <hjemli@gmail.com> writes:
>> Come to think of it, is there a reason why "for-each-repo" should
>> not be an extention to "submodule foreach"? We can view this as
>> visiting repositories that _could_ be registered as a submodule, in
>> addition to iterating over the registered submodules, no?
>
> Yes, but I see some possible problems with that approach:
> -'git for-each-repo' does not need to be started from within a git worktree
True, but "git submodule foreach --untracked" can be told that it is
OK not (yet) to be in any superproject, no?
> -'git for-each-repo' and 'git submodule foreach' have different
> semantics for --dirty and --clean
That could be a problem. Is there a good reason why they should use
different definitions of dirtyness?
> -'git for-each-repo' is in C because my 'git-all' shell script was
> horribly slow on large directory trees (especially on windows)
Your for-each-repo could be a good basis to build a new builtin
"submodule--foreach" that is a pure helper hidden from the end users
that does both; cmd_foreach() in git-submodule.sh can simply delegate
to it.
> All of these problems are probably solvable, but it would require
> quite some reworking of git-submodule.sh
Of course some work is needed, but we do not have to convert all the
cmd_foo in git-submodule.sh in one step. For the purpose of
unifying for-each-repo and submodule foreach to deliver the
functionality sooner to the end users, we can go the route to add
only the submodule--foreach builtin, out of which we will get
reusable implementation of module_list and other helper functions we
can leverage later to do other cmd_foo functions.
next prev parent reply other threads:[~2013-01-28 18:51 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-27 12:46 [PATCH v4 0/2] for-each-repo: new command for multi-repo operations Lars Hjemli
2013-01-27 12:46 ` [PATCH v4 1/2] for-each-repo: new command used " Lars Hjemli
2013-01-27 19:04 ` Junio C Hamano
2013-01-27 19:42 ` John Keeping
2013-01-27 19:45 ` Junio C Hamano
2013-01-28 7:50 ` Lars Hjemli
2013-01-28 8:10 ` Jonathan Nieder
2013-01-28 17:11 ` Lars Hjemli
2013-01-28 18:35 ` Junio C Hamano
2013-01-28 17:45 ` Junio C Hamano
2013-01-28 18:35 ` Lars Hjemli
2013-01-28 18:51 ` Junio C Hamano [this message]
2013-01-28 19:42 ` Lars Hjemli
2013-01-28 20:12 ` Jens Lehmann
2013-01-28 20:34 ` Junio C Hamano
2013-01-28 21:25 ` Jens Lehmann
2013-02-04 6:41 ` Junio C Hamano
2013-01-27 12:46 ` [PATCH v4 2/2] git: rewrite `git -a` to become a git-for-each-repo command Lars Hjemli
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7vr4l5w385.fsf@alter.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=hjemli@gmail.com \
--cc=jrnieder@gmail.com \
/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.
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 NNTP newsgroup(s).