[PATCH v2 2/2] submodule: drop the top-level requirement

2013-04-09 Thread John Keeping
Use the new rev-parse --prefix option to process all paths given to the submodule command, dropping the requirement that it be run from the top-level of the repository. Signed-off-by: John Keeping --- git-submodule.sh | 7 +++ t/t7400-submodule-basic.sh | 26 ++

Re: [PATCH v2 2/2] submodule: drop the top-level requirement

2013-04-09 Thread Junio C Hamano
John Keeping writes: > + eval "set $(git rev-parse --sq --prefix "$wt_prefix" -- "$@")" This may be handier than having to do the "for arg" loop git-am uses yourself. > ( > git ls-files --error-unmatch --stage -- "$@" || > echo "unmatched pathspec exists" >

Re: [PATCH v2 2/2] submodule: drop the top-level requirement

2013-04-09 Thread John Keeping
On Tue, Apr 09, 2013 at 02:00:52PM -0700, Junio C Hamano wrote: > John Keeping writes: > > > + eval "set $(git rev-parse --sq --prefix "$wt_prefix" -- "$@")" > > This may be handier than having to do the "for arg" loop git-am uses > yourself. > > > ( > > git ls-files --error-u

Re: [PATCH v2 2/2] submodule: drop the top-level requirement

2013-04-18 Thread Ramkumar Ramachandra
John Keeping wrote: > Use the new rev-parse --prefix option to process all paths given to the > submodule command, dropping the requirement that it be run from the > top-level of the repository. Yay! > diff --git a/git-submodule.sh b/git-submodule.sh > index 79bfaac..bbf7983 100755 > --- a/git-su

Re: [PATCH v2 2/2] submodule: drop the top-level requirement

2013-04-18 Thread John Keeping
On Thu, Apr 18, 2013 at 08:16:42PM +0530, Ramkumar Ramachandra wrote: > John Keeping wrote: > > Use the new rev-parse --prefix option to process all paths given to the > > submodule command, dropping the requirement that it be run from the > > top-level of the repository. > > Yay! > > > diff --gi