git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Re: What's cooking in git.git (May 2013, #09; Wed, 29)

From
Heiko Voigt <hvoigt@hvoigt.net>
Date
Jun 4, 2013, 05:29 UTC
Message-ID
<20130604052950.GA2943@book.hvoigt.net>
In-Reply-To
<20130603222341.GL1072@serenity.lan>
On Mon, Jun 03, 2013 at 11:23:41PM +0100, John Keeping wrote:
Show 27 quoted lines
> > 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
Previous: John KeepingNext: John Keeping
Message 15 of 23 in “What's cooking in git.git (May 2013, #09; Wed, 29)”
  1. Junio C HamanoMay 29, 2013
  2. Thomas RastMay 30, 2013
  3. Ramkumar RamachandraMay 30, 2013
  4. Junio C HamanoJun 2, 2013
  5. Jens LehmannMay 30, 2013
  6. Junio C HamanoJun 2, 2013
  7. Jens LehmannJun 3, 2013
  8. Junio C HamanoJul 1, 2013
  9. Jens LehmannMay 30, 2013
  10. John KeepingMay 31, 2013
  11. John KeepingJun 3, 2013
  12. Junio C HamanoJun 3, 2013
  13. Jens LehmannJun 3, 2013
  14. John KeepingJun 3, 2013
  15. Heiko VoigtJun 4, 2013
  16. John KeepingJun 4, 2013
  17. Heiko VoigtJun 4, 2013
  18. John KeepingJun 4, 2013
  19. Jens LehmannJun 4, 2013
  20. John KeepingJun 4, 2013
  21. Phil HordJun 4, 2013
  22. John KeepingJun 5, 2013
  23. Øystein WalleMay 31, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.