Re: [PATCH v4 1/2] for-each-repo: new command used for multi-repo operations

2013-02-03 Thread Junio C Hamano
Jens Lehmann jens.lehm...@web.de writes: Am 28.01.2013 21:34, schrieb Junio C Hamano: ... I was imagining that foreach --untracked could go something like this: * If you are inside an existing git repository, read its index to learn the gitlinks in the directory and its subdirectories.

Re: [PATCH v4 1/2] for-each-repo: new command used for multi-repo operations

2013-01-28 Thread Jonathan Nieder
Hi, Lars Hjemli wrote: [1] The 'git -a' rewrite patch shows how I think about this command - it's just an option to the 'git' command, modifying the way any subcommand is invoked (btw: I don't expect that patch to be applied since 'git-all' was deemed to generic, so I'll just carry the patch

Re: [PATCH v4 1/2] for-each-repo: new command used for multi-repo operations

2013-01-28 Thread Lars Hjemli
On Mon, Jan 28, 2013 at 9:10 AM, Jonathan Nieder jrnie...@gmail.com wrote: Lars Hjemli wrote: [1] The 'git -a' rewrite patch shows how I think about this command - it's just an option to the 'git' command, modifying the way any subcommand is invoked (btw: I don't expect that patch to be

Re: [PATCH v4 1/2] for-each-repo: new command used for multi-repo operations

2013-01-28 Thread Junio C Hamano
Jonathan Nieder jrnie...@gmail.com writes: Tracing backwards: it would be really nice to be able to do git for-each-repo git grep -e foo -- '*.c' This is a very good example that shows the command that is run in the repositories found may want pathspecs passed, but at the same time,

Re: [PATCH v4 1/2] for-each-repo: new command used for multi-repo operations

2013-01-28 Thread Junio C Hamano
Lars Hjemli hje...@gmail.com writes: On Mon, Jan 28, 2013 at 9:10 AM, Jonathan Nieder jrnie...@gmail.com wrote: ... So if I ran the world, then having commands git -a diff and git for-each-repo git diff do the same thing would be fine. Of course I don't run the world.

Re: [PATCH v4 1/2] for-each-repo: new command used for multi-repo operations

2013-01-28 Thread Lars Hjemli
On Mon, Jan 28, 2013 at 6:45 PM, Junio C Hamano gits...@pobox.com wrote: As to the pathspec limiting to affect the loop itself, not the argument given to the command that is run, I don't think it is absolutely needed; I am perfectly fine with declaring that for-each-repo goes to repositories

Re: [PATCH v4 1/2] for-each-repo: new command used for multi-repo operations

2013-01-28 Thread Junio C Hamano
Lars Hjemli hje...@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?

Re: [PATCH v4 1/2] for-each-repo: new command used for multi-repo operations

2013-01-28 Thread Jens Lehmann
Am 28.01.2013 19:51, schrieb Junio C Hamano: Lars Hjemli hje...@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

Re: [PATCH v4 1/2] for-each-repo: new command used for multi-repo operations

2013-01-28 Thread Junio C Hamano
Jens Lehmann jens.lehm...@web.de writes: Am 28.01.2013 19:51, schrieb Junio C Hamano: Lars Hjemli hje...@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

Re: [PATCH v4 1/2] for-each-repo: new command used for multi-repo operations

2013-01-28 Thread Jens Lehmann
Am 28.01.2013 21:34, schrieb Junio C Hamano: Jens Lehmann jens.lehm...@web.de writes: Am 28.01.2013 19:51, schrieb Junio C Hamano: Lars Hjemli hje...@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

Re: [PATCH v4 1/2] for-each-repo: new command used for multi-repo operations

2013-01-27 Thread Junio C Hamano
Lars Hjemli hje...@gmail.com writes: When working with multiple, unrelated (or loosly related) git repos, there is often a need to locate all repos with uncommitted work and perform some action on them (say, commit and push). Before this patch, such tasks would require manually visiting all

Re: [PATCH v4 1/2] for-each-repo: new command used for multi-repo operations

2013-01-27 Thread John Keeping
On Sun, Jan 27, 2013 at 11:04:08AM -0800, Junio C Hamano wrote: One more thing that nobody brought up during the previous reviews is if we want to support subset of repositories by allowing the standard pathspec match mechanism. For example, git for-each-repo -d git diff --name-only

Re: [PATCH v4 1/2] for-each-repo: new command used for multi-repo operations

2013-01-27 Thread Junio C Hamano
John Keeping j...@keeping.me.uk writes: On Sun, Jan 27, 2013 at 11:04:08AM -0800, Junio C Hamano wrote: One more thing that nobody brought up during the previous reviews is if we want to support subset of repositories by allowing the standard pathspec match mechanism. For example,

Re: [PATCH v4 1/2] for-each-repo: new command used for multi-repo operations

2013-01-27 Thread Lars Hjemli
On Sun, Jan 27, 2013 at 8:04 PM, Junio C Hamano gits...@pobox.com wrote: Lars Hjemli hje...@gmail.com writes: The command also honours the option '--clean' which restricts the set of repos to those which '--dirty' would skip, and '-x' which is used to execute non-git commands. It might make