Make "sync-all pull --rebase" work
authorSimon Marlow <marlowsd@gmail.com>
Mon, 3 Dec 2012 09:35:37 +0000 (09:35 +0000)
committerSimon Marlow <marlowsd@gmail.com>
Mon, 3 Dec 2012 09:40:51 +0000 (09:40 +0000)
By filtering out the --rebase when fetching submodules

sync-all

index efb84a6..9aa40d5 100755 (executable)
--- 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);