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