From: Junio C Hamano Date: Mon, 11 Mar 2013 05:03:07 GMT Subject: Re: [PATCH v2 05/23] contrib/subtree: Add commands pull_all and push_all Message-ID: <7vk3pebkac.fsf@alter.siamese.dyndns.org> In-Reply-To: <1362958891-26941-6-git-send-email-pcampbell@kemitix.net> 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.