Re: Restart submodule update --recursive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



(+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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]