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

Re: problems serving non-bare repos with submodules over http

From
Yaroslav Halchenko <yoh@onerussian.com>
Date
Apr 21, 2016, 03:14 UTC
Message-ID
<20160421031426.GY23764@onerussian.com>
In-Reply-To
<CAGZ79kbyDuu8hUQXOUNmDLyO88GOi3kqSzsc0UfgzwAL9peZHg@mail.gmail.com>
NB Thank you for the lively discussion!
On Wed, 20 Apr 2016, Stefan Beller wrote:
> >> So currently the protocol doesn't allow to even specify the submodules
> >> directories.
Show 5 quoted lines
> > Depends on what you exactly mean by "the protocol", but the
> > networking protocol is about accessing a single repository.  It is
> > up to you to decide where to go next after learning what you can
> > learn from the result, typically by following what appears in
> > the .gitmodules file.
> Right. But the .gitmodules file is not sufficient.
why?
> >...<
> I think on a hosting site they could even coexist when having the
> layout as above.
Show 6 quoted lines
>          top.git/
>          top.git/refs/{heads,tags,...}/...
>          top.git/objects/...
>          sub.git/
>          sub.git/refs/{heads,tags,...}/...
>          sub.git/objects/...
>          # the following only exist in non bare:
>          top.git/modules/sub.git/
>          top.git/modules/sub.git/refs/{heads,tags,...}/...
>          top.git/modules/sub.git/objects/...
> The later files would be more reflective of what you *really*
> want if you clone from top.git.

may be there is no need for assumptions and .gitmodules should be sufficient?

- absolute url in .gitmodules provides absolute URL/path to the
  submodule of interest, regardless either submodule is present in
  originating repository as updated submodule.  Either cloning it
  instead of original repository would be more efficient is already a
  heuristic which might fail miserably (may be I have a faster
  connection to the original repository pointed by the absolute
  url than to this particular repository)
- relative url in .gitmodules provides relative location to the location
  of the "top" repository, and that is only when that submodule "absolute"
  url should be resolved relative to the one of the "top" repository 

NB I will consider it a separate issue either relative paths without '../' prefix are having any sense in bare repositories.

or have I missed the point?
-- 
Yaroslav O. Halchenko
Center for Open Neuroscience     http://centerforopenneuroscience.org
Dartmouth College, 419 Moore Hall, Hinman Box 6207, Hanover, NH 03755
Phone: +1 (603) 646-9834                       Fax: +1 (603) 646-1419
WWW:   http://www.linkedin.com/in/yarik        
Previous: Stefan BellerNext: Stefan Beller
Message 8 of 12 in “problems serving non-bare repos with submodules over http”
  1. Yaroslav HalchenkoApr 20, 2016
  2. Stefan BellerApr 20, 2016
  3. Yaroslav HalchenkoApr 20, 2016
  4. Junio C HamanoApr 20, 2016
  5. Stefan BellerApr 20, 2016
  6. Junio C HamanoApr 20, 2016
  7. Stefan BellerApr 20, 2016
  8. Yaroslav HalchenkoApr 21, 2016
  9. Stefan BellerApr 21, 2016
  10. Junio C HamanoApr 21, 2016
  11. Stefan BellerApr 21, 2016
  12. Jacob KellerApr 21, 2016

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.