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

Re: [RFC] git submodule purge

From
Fredrik Gustafsson <iveqy@iveqy.com>
Date
Mar 17, 2015, 08:25 UTC
Message-ID
<20150317082556.GI3766@paksenarrion.iveqy.com>
In-Reply-To
<20150317081826.GB354@pks-pc>
On Tue, Mar 17, 2015 at 09:18:26AM +0100, Patrick Steinhardt wrote:
Show 8 quoted lines
> Is it even possible to create a new submodule without any
> upstream repository? At least `git submodule init` does not work
> without a corresponding entry in .gitmodules which the user would
> have needed to create himself manually. In this case one _could_
> assume that the user knows what he is doing and expect him not to
> call `submodule purge` (or whatever the command will be called)
> on the authoritative copy. Other than that I've got no idea how
> to assure safety.

Look at git/t/t7400-submodule-basic.sh for example at the test starting at line 84 on how to add a submodule without any upstream.

Git has already a disadvantage against other SCM (like mercurial) because it's "too easy to loose data with git". Meaning that we purge unrefered commits. (Yes this is up to debate if this is good or bad, but here's not the place).

I think we should be very carefully with adding commands that permanently removes data. They should be really well crafted so that there's no way to do this by mistake.

-- 
Fredrik Gustafsson

phone: +46 733-608274
e-mail: iveqy@iveqy.com
website: http://www.iveqy.com
Previous: Patrick SteinhardtNext: Jonathan Nieder
Message 4 of 11 in “[RFC] git submodule purge”
  1. Patrick SteinhardtMar 16, 2015
  2. Junio C HamanoMar 16, 2015
  3. Patrick SteinhardtMar 17, 2015
  4. Fredrik GustafssonMar 17, 2015
  5. Jonathan NiederMar 16, 2015
  6. Patrick SteinhardtMar 17, 2015
  7. Jens LehmannMar 23, 2015
  8. Patrick SteinhardtMar 25, 2015
  9. Jens LehmannMar 25, 2015
  10. Patrick SteinhardtMar 26, 2015
  11. Jens LehmannMar 26, 2015

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.