Examples of PathEdit


Examples of org.eclipse.jgit.dircache.DirCacheEditor.PathEdit

    final ObjectId id = ObjectId
        .fromString("abcd1234abcd1234abcd1234abcd1234abcd1234");
    final String path = "sub/dir/final";
    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.DirCacheEditor.PathEdit

    final ObjectId id2 = ObjectId
        .fromString("abcd1234abcd1234abcd1234abcd1234abcd1235");
    final String path2 = "sub2";
    DirCache cache = db.lockDirCache();
    DirCacheEditor editor = cache.editor();
    editor.add(new PathEdit(path1) {

      public void apply(DirCacheEntry ent) {
        ent.setFileMode(FileMode.GITLINK);
        ent.setObjectId(id1);
      }
    });
    editor.add(new PathEdit(path2) {

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

Examples of org.eclipse.jgit.dircache.DirCacheEditor.PathEdit

        "git://example.com/sub");
    writeTrashFile(DOT_GIT_MODULES, gitmodules.toText());

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

      public void apply(DirCacheEntry ent) {
        ent.setFileMode(FileMode.GITLINK);
        ent.setObjectId(subId);
      }
    });
    editor.add(new PathEdit(DOT_GIT_MODULES) {

      public void apply(DirCacheEntry ent) {
        ent.setFileMode(FileMode.REGULAR_FILE);
        ent.setObjectId(gitmodulesBlob);
      }
View Full Code Here

Examples of org.eclipse.jgit.dircache.DirCacheEditor.PathEdit

        "git://example.com/sub");

    RevCommit commit = testDb.getRevWalk().parseCommit(testDb.commit()
        .noParents()
        .add(DOT_GIT_MODULES, gitmodules.toText())
        .edit(new PathEdit(path) {

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

Examples of org.eclipse.jgit.dircache.DirCacheEditor.PathEdit

        "git://example.com/sub");

    RevCommit commit = testDb.getRevWalk().parseCommit(testDb.commit()
        .noParents()
        .add(DOT_GIT_MODULES, gitmodules.toText())
        .edit(new PathEdit(path) {

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

Examples of org.eclipse.jgit.dircache.DirCacheEditor.PathEdit

    final TreeWalk walk = new TreeWalk(db);
    walk.addTree(c1.getTree());
    walk.setRecursive(true);
    assertTrue(walk.next());

    editor.add(new PathEdit("a.txt") {

      public void apply(DirCacheEntry ent) {
        ent.setFileMode(FileMode.EXECUTABLE_FILE);
        ent.setObjectId(walk.getObjectId(0));
      }
View Full Code Here

Examples of org.eclipse.jgit.dircache.DirCacheEditor.PathEdit

    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.DirCacheEditor.PathEdit

    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.DirCacheEditor.PathEdit

    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.DirCacheEditor.PathEdit

    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
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.