From: Junio C Hamano Date: Wed, 23 Feb 2011 23:23:15 GMT Subject: Re: [PATCH 6/6] submodule update: Don't fetch when the submodule commit is already present Message-ID: <7v62sa5o9o.fsf@alter.siamese.dyndns.org> In-Reply-To: <4D656FDF.5050400@web.de> Jens Lehmann writes: > diff --git a/git-submodule.sh b/git-submodule.sh > index 8b90589..ea49760 100755 > --- a/git-submodule.sh > +++ b/git-submodule.sh > @@ -465,7 +465,7 @@ cmd_update() > if test -z "$nofetch" > then > (clear_local_git_env; cd "$path" && > - git-fetch) || > + (git rev-parse --verify $sha1 >/dev/null || git-fetch)) || Exactly the same comment as the one for [5/6] applies here.