Package org.eclipse.jgit.dircache

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


        ObjectInserter odi = repo.newObjectInserter();
        try {
          // Write the index as tree to the object database. This may
          // fail for example when the index contains unmerged paths
          // (unresolved conflicts)
          ObjectId indexTreeId = index.writeTree(odi);

          if (insertChangeId)
            insertChangeId(indexTreeId);

          // Create a Commit object, populate it and write it
View Full Code Here


        String branch = Repository.shortenRefName(head.getTarget()
            .getName());

        // Commit index changes
        CommitBuilder builder = createBuilder(headCommit);
        builder.setTreeId(cache.writeTree(inserter));
        builder.setMessage(MessageFormat.format(indexMessage, branch,
            headCommit.abbreviate(7).name(),
            headCommit.getShortMessage()));
        ObjectId indexCommit = inserter.insert(builder);
View Full Code Here

        builder.addParentId(indexCommit);
        builder.setMessage(MessageFormat.format(
            workingDirectoryMessage, branch,
            headCommit.abbreviate(7).name(),
            headCommit.getShortMessage()));
        builder.setTreeId(cache.writeTree(inserter));
        commitId = inserter.insert(builder);
        inserter.flush();

        updateStashRef(commitId, builder.getAuthor(),
            builder.getMessage());
View Full Code Here

        ObjectInserter odi = repo.newObjectInserter();
        try {
          // Write the index as tree to the object database. This may
          // fail for example when the index contains unmerged paths
          // (unresolved conflicts)
          ObjectId indexTreeId = index.writeTree(odi);

          if (insertChangeId)
            insertChangeId(indexTreeId);

          // Create a Commit object, populate it and write it
View Full Code Here

        ObjectInserter odi = repo.newObjectInserter();
        try {
          // Write the index as tree to the object database. This may
          // fail for example when the index contains unmerged paths
          // (unresolved conflicts)
          ObjectId indexTreeId = index.writeTree(odi);

          if (insertChangeId)
            insertChangeId(indexTreeId);

          // Create a Commit object, populate it and write it
View Full Code Here

        String branch = Repository.shortenRefName(head.getTarget()
            .getName());

        // Commit index changes
        CommitBuilder builder = createBuilder(headCommit);
        builder.setTreeId(cache.writeTree(inserter));
        builder.setMessage(MessageFormat.format(indexMessage, branch,
            headCommit.abbreviate(7).name(),
            headCommit.getShortMessage()));
        ObjectId indexCommit = inserter.insert(builder);
View Full Code Here

        builder.addParentId(indexCommit);
        builder.setMessage(MessageFormat.format(
            workingDirectoryMessage, branch,
            headCommit.abbreviate(7).name(),
            headCommit.getShortMessage()));
        builder.setTreeId(cache.writeTree(inserter));
        commitId = inserter.insert(builder);
        inserter.flush();

        updateStashRef(commitId, builder.getAuthor(),
            builder.getMessage());
View Full Code Here

        ObjectInserter odi = repo.newObjectInserter();
        try {
          // Write the index as tree to the object database. This may
          // fail for example when the index contains unmerged paths
          // (unresolved conflicts)
          ObjectId indexTreeId = index.writeTree(odi);

          if (insertChangeId)
            insertChangeId(indexTreeId);

          // Create a Commit object, populate it and write it
View Full Code Here

        String branch = Repository.shortenRefName(head.getTarget()
            .getName());

        // Commit index changes
        CommitBuilder builder = createBuilder(headCommit);
        builder.setTreeId(cache.writeTree(inserter));
        builder.setMessage(MessageFormat.format(indexMessage, branch,
            headCommit.abbreviate(7).name(),
            headCommit.getShortMessage()));
        ObjectId indexCommit = inserter.insert(builder);
View Full Code Here

        builder.addParentId(indexCommit);
        builder.setMessage(MessageFormat.format(
            workingDirectoryMessage, branch,
            headCommit.abbreviate(7).name(),
            headCommit.getShortMessage()));
        builder.setTreeId(cache.writeTree(inserter));
        commitId = inserter.insert(builder);
        inserter.flush();

        updateStashRef(commitId, builder.getAuthor(),
            builder.getMessage());
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.