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

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

From
Martin Waitz <tali@admingilde.org>
Date
May 25, 2007, 21:31 UTC
Message-ID
<20070525213103.GA8361@admingilde.org>
In-Reply-To
<1180127233893-git-send-email-skimo@liacs.nl>
hoi :)
On Fri, May 25, 2007 at 11:07:12PM +0200, skimo@liacs.nl wrote:
>  create mode 100644 submodules.c
>  create mode 100644 submodules.h
I think the list tends to prefer subproject over submodule.
Show 11 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.

Aside from that I really like it :-)
-- 
Martin Waitz
Previous: skimo@liacs.nlNext: Sven Verdoolaege
Message 3 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.