Package org.eclipse.jgit.dircache

Examples of org.eclipse.jgit.dircache.DirCacheEditor.commit()


      public void apply(DirCacheEntry ent) {
        ent.setFileMode(FileMode.GITLINK);
        ent.setObjectId(id);
      }
    });
    editor.commit();

    SubmoduleAddCommand command = new SubmoduleAddCommand(db);
    command.setPath(path);
    command.setURI("git://server/repo.git");
    try {
View Full Code Here


      public void apply(DirCacheEntry ent) {
        ent.setFileMode(FileMode.GITLINK);
        ent.setObjectId(id);
      }
    });
    editor.commit();

    SubmoduleStatusCommand command = new SubmoduleStatusCommand(db);
    Map<String, SubmoduleStatus> statuses = command.call();
    assertNotNull(statuses);
    assertEquals(1, statuses.size());
View Full Code Here

      public void apply(DirCacheEntry ent) {
        ent.setFileMode(FileMode.GITLINK);
        ent.setObjectId(id);
      }
    });
    editor.commit();

    FileBasedConfig modulesConfig = new FileBasedConfig(new File(
        db.getWorkTree(), Constants.DOT_GIT_MODULES), db.getFS());
    modulesConfig.setString(ConfigConstants.CONFIG_SUBMODULE_SECTION, path,
        ConfigConstants.CONFIG_KEY_PATH, path);
View Full Code Here

      public void apply(DirCacheEntry ent) {
        ent.setFileMode(FileMode.GITLINK);
        ent.setObjectId(id);
      }
    });
    editor.commit();

    String url = "git://server/repo.git";
    StoredConfig config = db.getConfig();
    config.setString(ConfigConstants.CONFIG_SUBMODULE_SECTION, path,
        ConfigConstants.CONFIG_KEY_URL, url);
View Full Code Here

      public void apply(DirCacheEntry ent) {
        ent.setFileMode(FileMode.GITLINK);
        ent.setObjectId(id);
      }
    });
    editor.commit();

    String url = "git://server/repo.git";
    StoredConfig config = db.getConfig();
    config.setString(ConfigConstants.CONFIG_SUBMODULE_SECTION, path,
        ConfigConstants.CONFIG_KEY_URL, url);
View Full Code Here

      public void apply(DirCacheEntry ent) {
        ent.setFileMode(FileMode.GITLINK);
        ent.setObjectId(id);
      }
    });
    editor.commit();

    String url = "git://server/repo.git";
    StoredConfig config = db.getConfig();
    config.setString(ConfigConstants.CONFIG_SUBMODULE_SECTION, path,
        ConfigConstants.CONFIG_KEY_URL, url);
View Full Code Here

      public void apply(DirCacheEntry ent) {
        ent.setFileMode(FileMode.GITLINK);
        ent.setObjectId(id);
      }
    });
    editor.commit();

    String url = "git://server/repo.git";
    StoredConfig config = db.getConfig();
    config.setString(ConfigConstants.CONFIG_SUBMODULE_SECTION, path,
        ConfigConstants.CONFIG_KEY_URL, url);
View Full Code Here

          }
        });
      } else
        dcedit.add(new DirCacheEditor.DeletePath(path));
    } finally {
      dcedit.commit();
    }
  }

  private ObjectId contentId(String revName, String path) throws Exception {
    RevCommit headCommit = db_t.getRevWalk().parseCommit(
View Full Code Here

      public void apply(DirCacheEntry ent) {
        ent.setFileMode(FileMode.GITLINK);
        ent.setObjectId(id);
      }
    });
    editor.commit();

    SubmoduleWalk gen = SubmoduleWalk.forIndex(db);
    assertTrue(gen.next());
    assertEquals(path, gen.getPath());
    assertEquals(id, gen.getObjectId());
View Full Code Here

      public void apply(DirCacheEntry ent) {
        ent.setFileMode(FileMode.GITLINK);
        ent.setObjectId(id);
      }
    });
    editor.commit();

    SubmoduleWalk gen = SubmoduleWalk.forIndex(db);
    assertTrue(gen.next());
    assertEquals(path, gen.getPath());
    assertEquals(id, gen.getObjectId());
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.