< prev index next >

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

Print this page
*** 36,16 ***
          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();
      }
--- 36,10 ---

*** 69,14 ***
                    .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("")
--- 63,10 ---

*** 163,15 ***
              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) {
--- 153,10 ---
< prev index next >