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

Re: [RFC/PATCH] clone: introduce clone.submoduleGitDir to relocate $GITDIR

From
Duy Nguyen <pclouds@gmail.com>
Date
Apr 17, 2013, 11:36 UTC
Message-ID
<CACsJy8DxspNbopJbSsvcCZZwMFees1JVV_iV5r7dXRJTngzmFA@mail.gmail.com>
In-Reply-To
<CALkWK0nLamX1XKcg2t7VWJTPuFhX+ctEGE=4sjSSd7JqMmGzPA@mail.gmail.com>

On Wed, Apr 17, 2013 at 9:13 PM, Ramkumar Ramachandra <artagnon@gmail.com> wrote:

Show 9 quoted lines
> Duy Nguyen wrote:
>> No, submodule code does not change "git clone". If I'm not mistaken,
>> submodule will not kick in until you type "git submodule something".
>> If I turn clone.submoduleGitDir on, how can I undo my mistake in a
>> user friendly way?
>
> So, if you currently want to add a submodule, you have to 'git
> submodule add', which runs clone internally apart from other things.
> How do you undo this mistake?

Well, it has "submodule" in the command line. My first reaction would be looking for "git submodule rm" or something.

Show 9 quoted lines
> What I'm essentially proposing is to give the job of cloning back to
> clone, and the job of adding back to add, instead of creating an
> unnatural abstraction over them using 'git submodule add'.  The point
> being: why would you ever _want_ to clone inside a worktree unless you
> intend to add a submodule?  In other words, you intent for running a
> 'git clone' inside a worktree is exactly the same as your intent for
> running a 'git submodule add' inside a worktree.  Ofcourse, if you
> have a fringe case where that was _not_ your intent, we'll provide a
> command-line switch to turn off the relocation for that clone.

No, the point is people make mistakes. What do we do in that case? Or will you introduce yet another "gc" command for clean up ~/bare? -- Duy

Previous: Ramkumar RamachandraNext: Ramkumar Ramachandra
Message 38 of 41 in “clone: introduce clone.submoduleGitDir to relocate $GITDIR”
  1. clone: introduce clone.submoduleGitDir to relocate $GITDIRRamkumar Ramachandra, Apr 13, 2013
  2. Junio C HamanoApr 15, 2013
  3. Junio C HamanoApr 15, 2013
  4. Ramkumar RamachandraApr 15, 2013
  5. Junio C HamanoApr 15, 2013
  6. Ramkumar RamachandraApr 15, 2013
  7. Ramkumar RamachandraApr 15, 2013
  8. Ramkumar RamachandraApr 15, 2013
  9. Duy NguyenApr 15, 2013
  10. Ramkumar RamachandraApr 15, 2013
  11. Junio C HamanoApr 15, 2013
  12. Ramkumar RamachandraApr 15, 2013
  13. Marc BranchaudApr 15, 2013
  14. Junio C HamanoApr 15, 2013
  15. Ramkumar RamachandraApr 15, 2013
  16. Jeff KingApr 15, 2013
  17. Junio C HamanoApr 15, 2013
  18. Ramkumar RamachandraApr 16, 2013
  19. Marc BranchaudApr 16, 2013
  20. Marc BranchaudApr 15, 2013
  21. Ramkumar RamachandraApr 16, 2013
  22. Marc BranchaudApr 16, 2013
  23. Marc BranchaudApr 15, 2013
  24. Junio C HamanoApr 15, 2013
  25. Marc BranchaudApr 15, 2013
  26. Junio C HamanoApr 15, 2013
  27. Ramkumar RamachandraApr 16, 2013
  28. Marc BranchaudApr 16, 2013
  29. Ramkumar RamachandraApr 15, 2013
  30. Jonathan NiederApr 16, 2013
  31. Ramkumar RamachandraApr 16, 2013
  32. Junio C HamanoApr 16, 2013
  33. Jonathan NiederApr 17, 2013
  34. Duy NguyenApr 17, 2013
  35. Ramkumar RamachandraApr 17, 2013
  36. Duy NguyenApr 17, 2013
  37. Ramkumar RamachandraApr 17, 2013
  38. Duy NguyenApr 17, 2013
  39. Ramkumar RamachandraApr 17, 2013
  40. Duy NguyenApr 17, 2013
  41. Junio C HamanoApr 17, 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.