Add "commit" to the list of commands sync-all supports
[ghc-hetmet.git] / sync-all
index c4ecfa3..f7caca5 100755 (executable)
--- a/sync-all
+++ b/sync-all
@@ -296,6 +296,11 @@ sub scmall {
                 # Hack around 'darcs whatsnew' failing if there are no changes
                 $ignore_failure = 1;
             }
+            elsif ($command =~ /^commit$/) {
+                @scm_args = ("commit");
+                # git fails if there is nothing to commit, so ignore failures
+                $ignore_failure = 1;
+            }
             elsif ($command =~ /^(?:pus|push)$/) {
                 @scm_args = "push";
                 $want_remote_repo = 1;
@@ -353,6 +358,11 @@ sub scmall {
                     @scm_args = ("remote", "set-url", $branch_name, $path);
                 }
             }
+            elsif ($command =~ /^grep$/) {
+              @scm_args = ("grep");
+              # Hack around 'git grep' failing if there are no matches
+              $ignore_failure = 1;
+            }
             else {
                 die "Unknown command: $command";
             }
@@ -394,6 +404,7 @@ What do you want to do?
 Supported commands:
 
  * whatsnew
+ * commit
  * push
  * pull
  * get, with options:
@@ -406,6 +417,7 @@ Supported commands:
  * remote add <branch-name>
  * remote rm <branch-name>
  * remote set-url [--push] <branch-name>
+ * grep
 
 Available package-tags are:
 END