Examples of editor()


Examples of org.eclipse.jgit.dircache.DirCache.editor()

    final ObjectId id = ObjectId
        .fromString("abcd1234abcd1234abcd1234abcd1234abcd1234");
    final String path = "sub";
    DirCache cache = db.lockDirCache();
    DirCacheEditor editor = cache.editor();
    editor.add(new PathEdit(path) {

      public void apply(DirCacheEntry ent) {
        ent.setFileMode(FileMode.GITLINK);
        ent.setObjectId(id);
View Full Code Here

Examples of org.eclipse.jgit.dircache.DirCache.editor()

    writeTrashFile("a.txt", "content");
    Git git = new Git(db);
    git.add().addFilepattern("a.txt").call();
    RevCommit c1 = git.commit().setMessage("initial commit").call();
    DirCache cache = db.lockDirCache();
    DirCacheEditor editor = cache.editor();
    final TreeWalk walk = new TreeWalk(db);
    walk.addTree(c1.getTree());
    walk.setRecursive(true);
    assertTrue(walk.next());
View Full Code Here

Examples of org.eclipse.jgit.dircache.DirCache.editor()

  private String addSubmoduleToIndex() throws IOException {
    final ObjectId id = ObjectId
        .fromString("abcd1234abcd1234abcd1234abcd1234abcd1234");
    final String path = "sub";
    DirCache cache = db.lockDirCache();
    DirCacheEditor editor = cache.editor();
    editor.add(new PathEdit(path) {

      public void apply(DirCacheEntry ent) {
        ent.setFileMode(FileMode.GITLINK);
        ent.setObjectId(id);
View Full Code Here

Examples of org.eclipse.jgit.dircache.DirCache.editor()

      ConfigInvalidException, NoWorkTreeException, GitAPIException {
    final ObjectId id = ObjectId
        .fromString("abcd1234abcd1234abcd1234abcd1234abcd1234");
    final String path = "sub";
    DirCache cache = db.lockDirCache();
    DirCacheEditor editor = cache.editor();
    editor.add(new PathEdit(path) {

      public void apply(DirCacheEntry ent) {
        ent.setFileMode(FileMode.GITLINK);
        ent.setObjectId(id);
View Full Code Here

Examples of org.eclipse.jgit.dircache.DirCache.editor()

    FileRepositoryBuilder builder = new FileRepositoryBuilder();
    builder.setWorkTree(new File(db.getWorkTree(), path));
    builder.build().create();

    DirCache cache = db.lockDirCache();
    DirCacheEditor editor = cache.editor();
    editor.add(new PathEdit(path) {

      public void apply(DirCacheEntry ent) {
        ent.setFileMode(FileMode.GITLINK);
        ent.setObjectId(id);
View Full Code Here

Examples of org.eclipse.jgit.dircache.DirCache.editor()

    FileRepositoryBuilder builder = new FileRepositoryBuilder();
    builder.setWorkTree(new File(db.getWorkTree(), path));
    builder.build().create();

    DirCache cache = db.lockDirCache();
    DirCacheEditor editor = cache.editor();
    editor.add(new PathEdit(path) {

      public void apply(DirCacheEntry ent) {
        ent.setFileMode(FileMode.GITLINK);
        ent.setObjectId(id);
View Full Code Here

Examples of org.eclipse.jgit.dircache.DirCache.editor()

    git.add().addFilepattern("file.txt").call();
    final RevCommit commit = git.commit().setMessage("create file").call();

    final String path = "sub";
    DirCache cache = db.lockDirCache();
    DirCacheEditor editor = cache.editor();
    editor.add(new PathEdit(path) {

      public void apply(DirCacheEntry ent) {
        ent.setFileMode(FileMode.GITLINK);
        ent.setObjectId(commit);
View Full Code Here

Examples of org.eclipse.jgit.dircache.DirCache.editor()

      GitAPIException {
    final ObjectId id = ObjectId
        .fromString("abcd1234abcd1234abcd1234abcd1234abcd1234");
    final String path = "sub";
    DirCache cache = db.lockDirCache();
    DirCacheEditor editor = cache.editor();
    editor.add(new PathEdit(path) {

      public void apply(DirCacheEntry ent) {
        ent.setFileMode(FileMode.GITLINK);
        ent.setObjectId(id);
View Full Code Here

Examples of org.eclipse.jgit.dircache.DirCache.editor()

      GitAPIException {
    final ObjectId id = ObjectId
        .fromString("abcd1234abcd1234abcd1234abcd1234abcd1234");
    final String path = "sub";
    DirCache cache = db.lockDirCache();
    DirCacheEditor editor = cache.editor();
    editor.add(new PathEdit(path) {

      public void apply(DirCacheEntry ent) {
        ent.setFileMode(FileMode.GITLINK);
        ent.setObjectId(id);
View Full Code Here

Examples of org.eclipse.jgit.dircache.DirCache.editor()

  }

  @Test
  public void testSymlinkNotModifiedThoughNormalized() throws Exception {
    DirCache dc = db.lockDirCache();
    DirCacheEditor dce = dc.editor();
    final String UNNORMALIZED = "target/";
    final byte[] UNNORMALIZED_BYTES = Constants.encode(UNNORMALIZED);
    ObjectInserter oi = db.newObjectInserter();
    final ObjectId linkid = oi.insert(Constants.OBJ_BLOB,
        UNNORMALIZED_BYTES, 0,
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.