git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sven Verdoolaege <skimo@kotnet.org>
To: Martin Waitz <tali@admingilde.org>
Cc: git@vger.kernel.org, Junio C Hamano <junkio@cox.net>,
	Alex Riesen <raa.lkml@gmail.com>
Subject: Re: [PATCH 2/3] entry.c: checkout available submodules
Date: Fri, 25 May 2007 23:42:05 +0200	[thread overview]
Message-ID: <20070525214205.GJ942MdfPADPa@greensroom.kotnet.org> (raw)
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.

> > @@ -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

  reply	other threads:[~2007-05-25 21:42 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-25 21:07 [PATCH 1/3] run-command: optionally clear git environment skimo
2007-05-25 21:07 ` [PATCH 2/3] entry.c: checkout available submodules skimo
2007-05-25 21:31   ` Martin Waitz
2007-05-25 21:42     ` Sven Verdoolaege [this message]
2007-05-25 22:19       ` Martin Waitz
2007-05-25 23:06         ` Junio C Hamano
2007-05-25 21:07 ` [PATCH 3/3] test for simple submodule checkout support skimo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070525214205.GJ942MdfPADPa@greensroom.kotnet.org \
    --to=skimo@kotnet.org \
    --cc=git@vger.kernel.org \
    --cc=junkio@cox.net \
    --cc=raa.lkml@gmail.com \
    --cc=skimo@liacs.nl \
    --cc=tali@admingilde.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).