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

Re: [PATCH 2/2] submodule: fix handling of supermodules with relative origin URLs

From
Jon Seymour <jon.seymour@gmail.com>
Date
May 20, 2012, 01:25 UTC
Message-ID
<CAH3AnrqM_T1kzHjtbZ5Vxz+jN6b-ZcxGUd5F=q23RXQLyQ2SYg@mail.gmail.com>
In-Reply-To
<4FB83BFC.4000702@web.de>
On Sun, May 20, 2012 at 10:34 AM, Jens Lehmann <Jens.Lehmann@web.de> wrote:
Show 31 quoted lines
> Am 20.05.2012 00:51, schrieb Jon Seymour:
>> On Sun, May 20, 2012 at 4:56 AM, Jens Lehmann <Jens.Lehmann@web.de> wrote:
>>> Am 19.05.2012 06:40, schrieb Jon Seymour:
>>>
>>> Just a small nit: I'd prefer to replace the 4 occurrences of the term
>>> "supermodule" with "superproject".
>>
>> Sure. I can't argue with precedent, of course, but I guess I was
>> favouring the consistency in the suffixes used with sub and super.
>
> No big deal, but in recent posts "superproject" has been used and
> the similarity between "supermodule" and "submodule" fooled me when
> I read your RFC patch. So even though a superproject might be the a
> submodule of another superproject, I'm all for using the term
> "superproject" to make the distinction obvious.
>
>>> So no objection on the code changes from my side.
>>
>> I noticed one relative case that is not handled properly yet, but
>> there is a workaround. If the superproject's origin URL is of the
>> form: foo/bar (a case I actually have myself for reasons I can explain
>> if you want me to), then the correct rule doesn't get matched by
>> .*/*). The workaround is for the user to change foo/bar style origin
>> URLs to ./foo/bar.
>>
>> Let me know if I should fix this case now too.
>
> Me thinks that this is subject for a subsequent patch. Having the
> URL of the superproject *below* the root directory of the
> superproject seems like a rather odd case which warrants a fix of
> its own ;-)

The situation arises in my case because my working directory (which has git controlled elements) contains a subdirectory called mnt with a symbolic link called git which points to the actual location of my git respositories. So, in this case:

    mnt/git/public/work.git -> /var/git/public/work.git
So, if I want to set my origin to be my public git repositories, I naturally do:
   git remote set-url origin mnt/git/public/work.git

I'll wait to hear Junio's preference with regard to how I should split the patches up before posting v3 that includes support for foo/bar in addition to ../foo/bar and ./foo/bar.

Regards,
jon.
Previous: Jens LehmannNext: Junio C Hamano
Message 8 of 10 in “submodule: add tests for add,sync,init in presence of relative super origin URL”
  1. 1/2 submodule: add tests for add,sync,init in presence of relative super origin URLJon Seymour, May 19, 2012
  2. 2/2 submodule: fix handling of supermodules with relative origin URLsJon Seymour, May 19, 2012
  3. Jens LehmannMay 19, 2012
  4. Jon SeymourMay 19, 2012
  5. Jon SeymourMay 19, 2012
  6. Jon SeymourMay 19, 2012
  7. Jens LehmannMay 20, 2012
  8. Jon SeymourMay 20, 2012
  9. Junio C HamanoMay 20, 2012
  10. Consistently use "superproject" instead of "supermodule"Jens Lehmann, May 20, 2012

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.