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

Re: [PATCH 2/3] entry.c: checkout available submodules

From
SVSven Verdoolaege <skimo@kotnet.org>
Date
May 25, 2007, 21:42 UTC
Message-ID
<20070525214205.GJ942MdfPADPa@greensroom.kotnet.org>
In-Reply-To
<20070525213103.GA8361@admingilde.org>
On Fri, May 25, 2007 at 11:31:03PM +0200, Martin Waitz wrote:
> I think the list tends to prefer subproject over submodule.

Does it? It seems that everyone writing code is use submodule instead of subproject. Either way, I don't really care.

Show 14 quoted lines
> > @@ -193,9 +220,8 @@ int checkout_entry(struct cache_entry *ce, const struct checkout *state, char *t
> >  		 */
> >  		unlink(path);
> >  		if (S_ISDIR(st.st_mode)) {
> > -			/* If it is a gitlink, leave it alone! */
> >  			if (S_ISGITLINK(ntohl(ce->ce_mode)))
> > -				return 0;
> > +				return checkout_submodule(ce, path, state);
> >  			if (!state->force)
> >  				return error("%s is a directory", path);
> >  			remove_subtree(path);
> 
> I think the call to checkout_submodule should be moved to write_entry,
> to keep it in line with the other mode types.

Well, like your patch, this only deals with cases where the submodule is already available. In write_entry you could potentially clone submodules based on some criteria, but I'm not doing this just yet since some people apparently prefer to get these things in pieces.

Also, it seems that some people would like this to be a step that is separated from git-checkout (see Lars' patch).

skimo
Previous: Martin WaitzNext: Martin Waitz
Message 4 of 7 in “run-command: optionally clear git environment”
  1. 1/3 run-command: optionally clear git environmentskimo@liacs.nl, May 25, 2007
  2. 2/3 entry.c: checkout available submodulesskimo@liacs.nl, May 25, 2007
  3. Martin WaitzMay 25, 2007
  4. Sven VerdoolaegeMay 25, 2007
  5. Martin WaitzMay 25, 2007
  6. Junio C HamanoMay 25, 2007
  7. 3/3 test for simple submodule checkout supportskimo@liacs.nl, May 25, 2007

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.