Examples of PathEdit


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

    git.add().addFilepattern("file.txt").call();
    final RevCommit id = 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(id);
      }
View Full Code Here

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

    git.add().addFilepattern("file.txt").call();
    final RevCommit id = 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(id);
      }
View Full Code Here

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

    git.add().addFilepattern("file.txt").call();
    final RevCommit id = 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(id);
      }
View Full Code Here

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

    git.add().addFilepattern("file.txt").call();
    final RevCommit id = 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(id);
      }
View Full Code Here

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

    git.add().addFilepattern("file.txt").call();
    final RevCommit id = git.commit().setMessage("create file").call();
    final String path = "sub/dir1/dir2";
    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

    while (treeWalk.next()) {
      DirCacheEntry entry = dci.getDirCacheEntry();
      // Only add one edit per path
      if (entry != null && entry.getStage() > DirCacheEntry.STAGE_1)
        continue;
      editor.add(new PathEdit(treeWalk.getPathString()) {
        public void apply(DirCacheEntry ent) {
          int stage = ent.getStage();
          if (stage > DirCacheEntry.STAGE_0) {
            if (checkoutStage != null) {
              if (stage == checkoutStage.number)
View Full Code Here

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

    final ObjectReader r = treeWalk.getObjectReader();
    DirCacheEditor editor = dc.editor();
    while (treeWalk.next()) {
      final ObjectId blobId = treeWalk.getObjectId(0);
      final FileMode mode = treeWalk.getFileMode(0);
      editor.add(new PathEdit(treeWalk.getPathString()) {
        public void apply(DirCacheEntry ent) {
          ent.setObjectId(blobId);
          ent.setFileMode(mode);
          checkoutPath(ent, r);
        }
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

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

      final String path) throws FileNotFoundException, IOException {
    ObjectInserter inserter = db.newObjectInserter();
    final File f = new File(workdir, path);
    final ObjectId id = inserter.insert(Constants.OBJ_BLOB,
        IO.readFully(f));
    return new PathEdit(path) {
      public void apply(DirCacheEntry ent) {
        ent.setFileMode(FileMode.REGULAR_FILE);
        ent.setLength(f.length());
        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.