git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Nieder <jrnieder@gmail.com>
To: Lukasz Palczewski <l.palczewski@prevac.pl>
Cc: git@vger.kernel.org, Jens Lehmann <Jens.Lehmann@web.de>
Subject: Re: Restart submodule update --recursive
Date: Thu, 28 Oct 2010 13:15:15 -0500	[thread overview]
Message-ID: <20101028181515.GB14212@burratino> (raw)
In-Reply-To: <loom.20101028T090353-376@post.gmane.org>

(+cc: Jens of submodule-usability-enhancements fame)

Hi Lukasz,

Lukasz Palczewski wrote:

>                                                                       I use git
> command: git submodule update --recursive
[...]
>                 If I have some local changes in some submodule, the command
> stops and I have to revert the changes and start the submodule update from the
> begining again.
> Is there a way to start the submodule update from the place, where the error
> occured and the command stop? Something like:
> git submodule update --recursive --restart_form_last_error

How many submodules are involved here?  I suspect there is some
optimization possible: if a submodule was already updated, there
should not be much to do on the second pass, right?  What aspect of
the update seems to take the most time (as witnessed by pstree -a, for
example)?  Maybe what would be most useful is a hypothetical

	git submodule update --fetch-only
	(or git fetch --recursive)

followed by

	git submodule update --no-fetch
	(or git checkout --recursive)

?

But if there are many, many submodules, it could be better to script
a --save-progress and --resume along the lines you described.

Two possible approaches:

 - Make a new script using "git submodule foreach --recursive" that
   steps through the list by hand, or

 - Take cmd_update from git-submodule.sh in the git sources and modify
   to taste.

If you follow either of those approaches, please keep up posted.  Such
scripts are inspiring and can be useful to others, too.

Thanks for an interesting example,
Jonathan

  parent reply	other threads:[~2010-10-28 18:15 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-28  7:25 Restart submodule update --recursive Lukasz Palczewski
2010-10-28 10:35 ` Johan Herland
2010-10-29  7:28   ` Lukasz Palczewski
2010-10-28 18:15 ` Jonathan Nieder [this message]
2010-10-29  7:17   ` Lukasz Palczewski
2010-10-29  9:12     ` Jonathan Nieder
2010-10-29 11:37       ` Lukasz Palczewski
2010-10-29 16:40         ` Jonathan Nieder
2010-10-30  7:17         ` Jens Lehmann
2010-11-02  8:18           ` Lukasz Palczewski
2010-11-02 11:08             ` Jens Lehmann

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=20101028181515.GB14212@burratino \
    --to=jrnieder@gmail.com \
    --cc=Jens.Lehmann@web.de \
    --cc=git@vger.kernel.org \
    --cc=l.palczewski@prevac.pl \
    /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).