diff options
author | Thomas Miedema <thomasmiedema@gmail.com> | 2014-06-11 17:12:35 +0200 |
---|---|---|
committer | Thomas Miedema <thomasmiedema@gmail.com> | 2014-06-23 16:02:26 +0200 |
commit | bd07942e4d1cb92d9c1eb8b776f38a95aa8bbe7e (patch) | |
tree | bad8c679b99fdae98831b8b975d20988c212d437 /sync-all | |
parent | 4612524542e26c782e8e1255b6e323c704310b56 (diff) | |
download | haskell-bd07942e4d1cb92d9c1eb8b776f38a95aa8bbe7e.tar.gz |
sync-all: delete dead code calling gitInitSubmodules
When running './sync-all get', 'git submodule init' has to be (and is
always) executed, since .gitmodules might contain new submodules (see
commit c3db2b). As a result, after cloning the ghc repo and running the
initial './sync-all get', .git/config will always contain some submodule
sections. Therefore it is not needed to check for this on every
subsequent get or pull, and this code can be deleted.
Diffstat (limited to 'sync-all')
-rwxr-xr-x | sync-all | 21 |
1 files changed, 0 insertions, 21 deletions
@@ -69,16 +69,6 @@ sub parsePackages { } } -sub tryReadFile { - my $filename = shift; - my @lines; - - open (FH, $filename) or return ""; - @lines = <FH>; - close FH; - return join('', @lines); -} - sub message { if ($verbose >= 2) { print "@_\n"; @@ -903,17 +893,7 @@ sub main { &gitInitSubmodules(@submodule_args); } - if ($command eq "pull") { - my $gitConfig = &tryReadFile(".git/config"); - if ($gitConfig !~ /submodule/) { - &gitInitSubmodules(@submodule_args); - } - } if ($command eq "get" or $command eq "pull") { - my $gitConfig = &tryReadFile(".git/config"); - if ($gitConfig !~ /submodule/) { - &gitInitSubmodules(@submodule_args); - } &git(".", "submodule", "update", @submodule_args); } } @@ -1030,4 +1010,3 @@ EOF } main(@ARGV); - |