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

Re: [RFC PATCH 2/4] change submodule push test to use proper repository setup

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 10, 2017, 23:31 UTC
Message-ID
<xmqq7ew2pokm.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<CAGZ79kZFtMxD8wf59SViOOc_mrhwTVr6v0ucAePp+-8hg_im-Q@mail.gmail.com>
Stefan Beller <sbeller@google.com> writes:
Show 8 quoted lines
> So you propose to make git-add behave like "git submodule add"
> (i.e. also add the .gitmodules entry for name/path/URL), which I
> like from a submodule perspective.
>
> However other users of gitlinks might be confused[1], which is why
> I refrained from "making every gitlink into a submodule". Specifically
> the more powerful a submodule operation is (the more fluff adds),
> the harder it should be for people to mis-use it.
A few questions that come to mind are:
 - Does "git add sub/" have enough information to populate
   .gitmodules?  If we have reasonable "default" values for
   .gitmodules entries (e.g. missing URL means we won't fetch when
   asked to go recursively fetch), perhaps we can leave everything
   other than "submodule.$name.path" undefined.
 - Can't we help those who have gitlinks without .gitmodules entries
   exactly the same way as above, i.e. when we see a gitlink and try
   to treat it as a submodule, we'd first try to look it up from
   .gitmodules (by going from path to name and then to
   submodule.$name.$var); the above "'git add sub/' would add an
   entry for .gitmodules" wish is based on the assumption that there
   are reasonable "default" values for each of these $var--so by
   basing on the same assumption, we can "pretend" as if these
   submodule.$name.$var were in .gitmodules file when we see
   gitlinks without .gitmodules entries.  IOW, if "git add sub/" can
   add .gitmodules to help people without having to type "git
   submodule add sub/", then we can give exactly the same degree of
   help without even modifying .gitmodules when "git add sub/" is
   run.
 - Even if we could solve it with "git add sub/" that adds to
   .gitmodules, is it a good solution, when we can solve the same
   thing without having to do so?
Previous: Stefan BellerNext: Stefan Beller
Message 7 of 18 in “implement fetching of moved submodules”
  1. 0/4 implement fetching of moved submodulesHeiko Voigt, Oct 6, 2017
  2. 1/4 fetch: add test to make sure we stay backwards compatibleHeiko Voigt, Oct 6, 2017
  3. 2/4 change submodule push test to use proper repository setupHeiko Voigt, Oct 6, 2017
  4. Stefan BellerOct 9, 2017
  5. Heiko VoigtOct 10, 2017
  6. Stefan BellerOct 10, 2017
  7. Junio C HamanoOct 10, 2017
  8. Stefan BellerOct 10, 2017
  9. Junio C HamanoOct 11, 2017
  10. Heiko VoigtOct 11, 2017
  11. Junio C HamanoOct 12, 2017
  12. Heiko VoigtOct 11, 2017
  13. Josh TriplettOct 11, 2017
  14. Brandon WilliamsOct 12, 2017
  15. 4/4 submodule: simplify decision tree whether to or not to fetchHeiko Voigt, Oct 6, 2017
  16. 3/4 implement fetching of moved submodulesHeiko Voigt, Oct 6, 2017
  17. Stefan BellerOct 6, 2017
  18. Junio C HamanoOct 7, 2017

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.