[commit: ghc] master: Tweak sync-all (c3db2b2)

Ian Lynagh <[email protected]>
Newsgroups gmane.comp.lang.haskell.cvs.ghc
Message-ID <[email protected]>
Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/c3db2b2c449e21d0358f1ed4b7a5dd447477ac28

>---------------------------------------------------------------

commit c3db2b2c449e21d0358f1ed4b7a5dd447477ac28
Author: Ian Lynagh <[email protected]>
Date:   Sun Dec 2 20:51:35 2012 +0000

    Tweak sync-all
    
    It wasn't handling new submodules appearing

>---------------------------------------------------------------

 sync-all |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/sync-all b/sync-all
index 9a2f753..414aa8b 100755
--- a/sync-all
+++ b/sync-all
@@ -773,6 +773,15 @@ sub main {
 
         scmall ($command, @_);
 
+        if ($command eq "get") {
+            &scm(".", "git", "submodule", "init");
+        }
+        if ($command eq "pull") {
+            my $gitConfig = &tryReadFile(".git/config");
+            if ($gitConfig !~ /submodule/) {
+                &scm(".", "git", "submodule", "init");
+            }
+        }
         if ($command eq "get" or $command eq "pull") {
             my $gitConfig = &tryReadFile(".git/config");
             if ($gitConfig !~ /submodule/) {
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.