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

2013-02-03 Thread Junio C Hamano
Jens Lehmann 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 Jens Lehmann
Am 28.01.2013 21:34, schrieb Junio C Hamano: > Jens Lehmann writes: > >> Am 28.01.2013 19:51, schrieb Junio C Hamano: >>> Lars Hjemli 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 > v

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

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

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 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 i

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 7:51 PM, Junio C Hamano wrote: > Lars Hjemli 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 >>> add

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

2013-01-28 Thread Junio C Hamano
Lars Hjemli 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,

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 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 in all subdirec

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

2013-01-28 Thread Junio C Hamano
Lars Hjemli writes: > On Mon, Jan 28, 2013 at 9:10 AM, Jonathan Nieder 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. ;-) > > This w

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

2013-01-28 Thread Junio C Hamano
Jonathan Nieder 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, makes me realize th

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 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 applied >> sin

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 pa

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 wrote: > Lars Hjemli 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 sense to internally use

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

2013-01-27 Thread Junio C Hamano
John Keeping 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, >> >> git for-ea

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-on

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

2013-01-27 Thread Junio C Hamano
Lars Hjemli 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 repositories,

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

2013-01-27 Thread Lars Hjemli
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 repositories, running `git status` within ea