[commit: ghc] master: Make "sync-all pull --rebase" work (3a40456)

Simon Marlow <[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/3a40456f9befa1f3c4a83480f76f44f2babfafb9

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

commit 3a40456f9befa1f3c4a83480f76f44f2babfafb9
Author: Simon Marlow <[email protected]>
Date:   Mon Dec 3 09:35:37 2012 +0000

    Make "sync-all pull --rebase" work
    
    By filtering out the --rebase when fetching submodules

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

 sync-all |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/sync-all b/sync-all
index efb84a6..9aa40d5 100755
--- a/sync-all
+++ b/sync-all
@@ -380,15 +380,19 @@ sub scmall {
         }
         elsif ($command eq "pull") {
             my $realcmd;
+            my @realargs;
             if ($remotepath eq "-") {
                 # Only fetch for the submodules. "git submodule update"
                 # will take care of making us point to the right commit.
                 $realcmd = "fetch";
+                # we like "sync-all pull --rebase" to work:
+                @realargs = grep(!/--rebase/,@args);
             }
             else {
                 $realcmd = "pull";
+                @realargs = @args;
             }
-            scm ($localpath, $scm, $realcmd, @args);
+            scm ($localpath, $scm, $realcmd, @realargs);
         }
         elsif ($command eq "new-workdir") {
             gitNewWorkdir ($localpath, @args);
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.