From: Paul Campbell Date: Mon, 11 Mar 2013 11:49:14 GMT Subject: Re: [PATCH v2 05/23] contrib/subtree: Add commands pull_all and push_all Message-ID: In-Reply-To: <7vk3pebkac.fsf@alter.siamese.dyndns.org> On Mon, Mar 11, 2013 at 5:03 AM, Junio C Hamano wrote: > Paul Campbell writes: > >> From: bibendi >> >> For each subtree listed in .gittrees perform a push or a pull. >> >> Signed-off-by: Paul Campbell >> >> Conflicts: >> contrib/subtree/git-subtree.sh > > The "Conflicts:" part is totally irrelevant. Please remove. > >> --- >> contrib/subtree/git-subtree.sh | 25 ++++++++++++++++++++++--- >> 1 file changed, 22 insertions(+), 3 deletions(-) >> >> diff --git a/contrib/subtree/git-subtree.sh b/contrib/subtree/git-subtree.sh >> index 1aff956..ddae56e 100755 >> --- a/contrib/subtree/git-subtree.sh >> +++ b/contrib/subtree/git-subtree.sh >> @@ -12,6 +12,7 @@ git subtree add --prefix= >> git subtree add --prefix= >> git subtree merge --prefix= >> git subtree pull --prefix= >> +git subtree pull_all > > Why isn't it "pull --all"? > >> git subtree push --prefix= > > Where did "push_all" go? > >> +cmd_pull_all() >> +{ >> + git config -f .gittrees -l | grep subtree | grep path | grep -o '=.*' | grep -o '[^=].*' | > > "grep -o" is not even in POSIX. Besides, what is this trying to > parse? Is it expected to match lines like > > path.subtree=trash > > with this, or is it more like you only want something like this: > > subtree.over/there.path=foo > > in which case you would want to read with something like > > sed -n -e 's/^subtree\...*\.path=\(.*\)/\1/p' > > instead (modulo the usual caveat on $IFS whitespaces in path)? > >> + while read path; do >> + git subtree pull -P $path master || exit $? >> + done >> +} > > I'd stop looking at this series myself at this step for now. Thanks for your feedback. Plenty there for me already to get cracking on. -- Paul [W] Campbell