Package org.eclipse.jgit.dircache

Examples of org.eclipse.jgit.dircache.DirCacheBuilder.finish()


      throw new JGitInternalException(JGitText.get().emptyCommit);

    // update index
    dcEditor.commit();
    // finish temporary in-core index used for this commit
    dcBuilder.finish();
    return inCoreIndex;
  }

  /**
   * Look an entry's path up in the list of paths specified by the --only/ -o
View Full Code Here


      throw new JGitInternalException(JGitText.get().emptyCommit);

    // update index
    dcEditor.commit();
    // finish temporary in-core index used for this commit
    dcBuilder.finish();
    return inCoreIndex;
  }

  /**
   * Look an entry's path up in the list of paths specified by the --only/ -o
View Full Code Here

      throw new JGitInternalException(JGitText.get().emptyCommit);

    // update index
    existingBuilder.commit();
    // finish temporary in-core index used for this commit
    tempBuilder.finish();
    return inCoreIndex;
  }

  /**
   * Look an entry's path up in the list of paths specified by the --only/ -o
View Full Code Here

    final DirCache dc = DirCache.newInCore();
    final DirCacheBuilder b = dc.builder();
    b.addTree(new byte[0], // no prefix path
        DirCacheEntry.STAGE_0, // standard stage
        pdb.newObjectReader(), rw.parseTree(branch.getObjectId()));
    b.finish();
    return dc;
  }

  private static void logAndThrowSubmoduleException(final String errorMsg,
      final Exception e) throws SubmoduleException {
View Full Code Here

      MissingObjectException, IncorrectObjectTypeException {
    DirCache dc = DirCache.newInCore();
    if (tree != null) {
      DirCacheBuilder b = dc.builder();
      b.addTree(new byte[0], DirCacheEntry.STAGE_0, reader, tree);
      b.finish();
    }
    return dc;
  }

  protected Config readConfig(String fileName) throws IOException,
View Full Code Here

            res.setObjectId(entry.getObjectId());
          }
          builder.add(res);
          i = next;
        }
        builder.finish();
        treeId = dc.writeTree(ins);
      }
      ins.flush();
    } finally {
      ins.release();
View Full Code Here

      for (DirCacheEntry entry : getTreeEntries(db, ignorePaths)) {
        builder.add(entry);
      }

      // finish temporary in-core index used for this commit
      builder.finish();

      // commit the change
      commitIndex(db, newIndex, createdBy, msg);

    } catch (ConcurrentRefUpdateException e) {
View Full Code Here

            }
          }
        }

        // finish temporary in-core index used for this commit
        builder.finish();

        success = commitIndex(db, index, deletedBy, "- " + ticket.number);

      } catch (Throwable t) {
        log.error(MessageFormat.format("Failed to delete ticket {0,number,0} from {1}",
View Full Code Here

      for (DirCacheEntry entry : getTreeEntries(db, ignorePaths)) {
        builder.add(entry);
      }

      // finish the index
      builder.finish();
    } finally {
      inserter.release();
    }
    return newIndex;
  }
View Full Code Here

        entry.setObjectId(odi.insert(org.eclipse.jgit.lib.Constants.OBJ_BLOB, bytes));

        indexBuilder.add(entry);
      }

      indexBuilder.finish();

      if (newIndex.getEntryCount() == 0) {
        // nothing to commit
        return false;
      }
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.