Hack fix for 'submodule update does not fetch already present commits' wtk/submodule.name.branch-v4
authorW. Trevor King <wking@tremily.us>
Mon, 26 Nov 2012 20:42:04 +0000 (15:42 -0500)
committerW. Trevor King <wking@tremily.us>
Mon, 26 Nov 2012 20:42:04 +0000 (15:42 -0500)
git-submodule.sh

index 28eb4b1a6d95cc16eb91af10ee2fc2851b772387..f4a681c58cd128c1725865b68b4bde1a45395482 100755 (executable)
@@ -640,7 +640,7 @@ Maybe you want to use 'update --init'?")"
                                subforce="-f"
                        fi
 
-                       if test -z "$nofetch"
+                       if test -z "$nofetch" -a "$subsha1" != "$sha1"
                        then
                                # Run fetch only if $sha1 isn't present or it
                                # is not reachable from a ref.