< prev index next >

cli/src/main/java/org/openjdk/skara/cli/GitSync.java

Print this page
@@ -36,16 +36,10 @@
          System.err.println(message);
          System.exit(1);
          return new IOException("will never reach here");
      }
  
-     private static int fetch() throws IOException, InterruptedException {
-         var pb = new ProcessBuilder("git", "fetch");
-         pb.inheritIO();
-         return pb.start().waitFor();
-     }
- 
      private static int pull() throws IOException, InterruptedException {
          var pb = new ProcessBuilder("git", "pull");
          pb.inheritIO();
          return pb.start().waitFor();
      }

@@ -69,14 +63,10 @@
                    .optional(),
              Switch.shortcut("")
                    .fullname("pull")
                    .helptext("Pull current branch from origin after successful sync")
                    .optional(),
-             Switch.shortcut("")
-                   .fullname("fetch")
-                   .helptext("Fetch current branch from origin after successful sync")
-                   .optional(),
              Switch.shortcut("m")
                    .fullname("mercurial")
                    .helptext("Force use of mercurial")
                    .optional(),
              Switch.shortcut("")

@@ -163,15 +153,10 @@
              var fetchHead = repo.fetch(upstreamPullPath, branch.hash().hex());
              repo.push(fetchHead, originPushPath, name);
              System.out.println("done");
          }
  
-         if (arguments.contains("fetch")) {
-             int err = fetch();
-             if (err != 0) {
-                 System.exit(err);
-             }
          }
  
          if (arguments.contains("pull")) {
              int err = pull();
              if (err != 0) {
< prev index next >