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

Re: [PATCH] update-index: allow overwriting existing submodule index entries

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 11, 2012, 15:03 UTC
Message-ID
<7v3961ao1q.fsf@alter.siamese.dyndns.org>
In-Reply-To
<20120609142658.GB16268@book.hvoigt.net>
Heiko Voigt <hvoigt@hvoigt.net> writes:
Show 8 quoted lines
> In commit e01105 Linus introduced gitlinks to update-index. He explains
> that he thinks it is not the right thing to replace a gitlink with
> something else.
>
> That commit is from the very first beginnings of submodule support.
> Since then we have gotten a lot closer to being able to remove a
> submodule without losing its history. This check prevents such a use
> case, so I think this assumption has changed.

Yeah, I think we should remove it if only to make it consistent with "add" (if anything, the Porcelain level "add" should be the one that is more strict and the plumbing level should be able to let you shoot in the foot, not the other way around), but we need to make sure "closer to" becomes reality. Can we remove and the resurrect automatically when checking out a branch with a submodule when you are on a branch with a directory and vice versa?

Previous: Heiko VoigtNext: Jens Lehmann
Message 4 of 7 in “Bug in git citool when staging symlink as replacement for submodule”
  1. Adam SpiersJun 1, 2012
  2. git-gui: recognize submodule diff when replaced by fileHeiko Voigt, Jun 9, 2012
  3. update-index: allow overwriting existing submodule index entriesHeiko Voigt, Jun 9, 2012
  4. Junio C HamanoJun 11, 2012
  5. Jens LehmannJun 11, 2012
  6. Heiko VoigtJun 12, 2012
  7. Jens LehmannJun 12, 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.