summaryrefslogtreecommitdiff
path: root/sync-all
diff options
context:
space:
mode:
authorThomas Miedema <thomasmiedema@gmail.com>2014-06-11 17:12:35 +0200
committerThomas Miedema <thomasmiedema@gmail.com>2014-06-23 16:02:26 +0200
commitbd07942e4d1cb92d9c1eb8b776f38a95aa8bbe7e (patch)
treebad8c679b99fdae98831b8b975d20988c212d437 /sync-all
parent4612524542e26c782e8e1255b6e323c704310b56 (diff)
downloadhaskell-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-xsync-all21
1 files changed, 0 insertions, 21 deletions
diff --git a/sync-all b/sync-all
index e0e1f5590e..7b9d2208a2 100755
--- a/sync-all
+++ b/sync-all
@@ -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);
-