Example #1
0
 private static List<URIish> getURIs(final RemoteConfig cfg, final Operation op) {
   switch (op) {
     case FETCH:
       return cfg.getURIs();
     case PUSH:
       {
         List<URIish> uris = cfg.getPushURIs();
         if (uris.isEmpty()) uris = cfg.getURIs();
         return uris;
       }
     default:
       throw new IllegalArgumentException(op.toString());
   }
 }
Example #2
0
 private static boolean doesNotExist(final RemoteConfig cfg) {
   return cfg.getURIs().isEmpty() && cfg.getPushURIs().isEmpty();
 }