On Mon, Jun 03, 2013 at 11:23:41PM +0100, John Keeping wrote:
> > Sorry, I should have been more specific here. I saw that you did some
> > changes to make "submodule add" do the right thing with relative paths,
> > but the following change to t7406 does not work like I believe it
> > should but instead makes the test fail:
> > -------------------8<---------------------
> > diff --git a/t/t7406-submodule-update.sh b/t/t7406-submodule-update.sh
> > index a4ffea0..9766b9e 100755
> > --- a/t/t7406-submodule-update.sh
> > +++ b/t/t7406-submodule-update.sh
> > @@ -559,7 +559,9 @@ test_expect_success 'add different submodules to the 
> > same pa
> >  test_expect_success 'submodule add places git-dir in superprojects 
> > git-dir' '
> >         (cd super &&
> >          mkdir deeper &&
> > -        git submodule add ../submodule deeper/submodule &&
> > +        (cd deeper &&
> > +         git submodule add ../../submodule submodule
> > +        ) &&
> >          (cd deeper/submodule &&
> >           git log > ../../expected
> >          ) &&
> > -------------------8<---------------------
> 
> Ah, ok.  I think this case is problematic because the repository
> argument is either relative to "remote.origin.url" or to the top of the
> working tree if there is no "origin" remote.  I wonder if we should just
> die when a relative path is given for the repository and we're not at
> the top of the working tree.

Why not behave as if we are at the top of the working tree for relative
paths? If there is an origin remote thats fine. If there is no origin
remote you could warn that the path used is taken relative from the root
of the superproject during add. What do you think?

Cheers Heiko
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to