Re: [PATCH v2 05/23] contrib/subtree: Add commands pull_all and push_all
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Mar 11, 2013, 05:03 UTC
- Message-ID
- <7vk3pebkac.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <1362958891-26941-6-git-send-email-pcampbell@kemitix.net>
Paul Campbell <pcampbell@kemitix.net> writes:
Show 8 quoted lines
> From: bibendi <bibendi@bk.ru> > > For each subtree listed in .gittrees perform a push or a pull. > > Signed-off-by: Paul Campbell <pcampbell@kemitix.net> > > Conflicts: > contrib/subtree/git-subtree.sh
The "Conflicts:" part is totally irrelevant. Please remove.
Show 13 quoted lines
> --- > 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=<prefix> <commit> > git subtree add --prefix=<prefix> <repository> <commit> > git subtree merge --prefix=<prefix> <commit> > git subtree pull --prefix=<prefix> <repository> <refspec...> > +git subtree pull_all
Why isn't it "pull --all"?
> git subtree push --prefix=<prefix> <repository> <refspec...>
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.