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

Re: [PATCH] fix "git-submodule add a/b/c/repository"

From
Mark Levedahl <mlevedahl@gmail.com>
Date
Jul 8, 2008, 23:57 UTC
Message-ID
<4873FEF7.7000005@gmail.com>
In-Reply-To
<7vhcb0x6ak.fsf@gitster.siamese.dyndns.org>
Junio C Hamano wrote:
Show 6 quoted lines
> Thanks.
>
> The above is quite a bit more information than I can read from
> Documentation/git-submodule.txt; care to send it in in a patch form?
>
>   

Will do, but I think it makes more sense to clean things up a bit so they are more explicable:

1) *require* two arguments for add: <URL> <relative-path-in-repo>
2) Remove one option for URL. Currently, we accept:
    a) absolute URL : origin is at URL
    b) top-level-relative URL (./foo | ../foo) : locates origin relative 
to top-level origin
    c) path-relative URL : locates origin relative to current working 
directory

I don't understand the use-case for item (c), and in any case it is easily replaced as an abolute url (e.g., $(pwd)/URL). So, I propose to restrict to (a) or (b) only, and reject (c).

I think these two changes in concert will reduce a lot of confusion without removing any real capability. Absent negative comments, I will prepare a patch to do this, *and* update the documentation to better define the options.

Mark
Previous: Junio C HamanoNext: Mark Levedahl
Message 10 of 15 in “fix "git-submodule add a/b/c/repository"”
  1. fix "git-submodule add a/b/c/repository"Sylvain Joyeux, Jul 1, 2008
  2. Junio C HamanoJul 6, 2008
  3. Sylvain JoyeuxJul 6, 2008
  4. Mark LevedahlJul 6, 2008
  5. Sylvain JoyeuxJul 7, 2008
  6. Mark LevedahlJul 8, 2008
  7. Junio C HamanoJul 8, 2008
  8. Mark LevedahlJul 8, 2008
  9. Junio C HamanoJul 8, 2008
  10. Mark LevedahlJul 8, 2008
  11. git-submodule - make "submodule add" more strict, and document itMark Levedahl, Jul 9, 2008
  12. Junio C HamanoJul 9, 2008
  13. git-submodule - make "submodule add" more strict, and document itMark Levedahl, Jul 10, 2008
  14. git-submodule - register submodule URL if adding in placeMark Levedahl, Jul 10, 2008
  15. Sylvain JoyeuxJul 8, 2008

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.