Package org.eclipse.jgit.lib

Examples of org.eclipse.jgit.lib.Config.toText()


        config.setString("gitflow", null, "releaseBranchPrefix", "release/");
        config.setString("gitflow", null, "hotfixBranchPrefix", "hotfix/");
        config.setString("gitflow", null, "supportBranchPrefix", "support/");
        config.setString("gitflow", null, "versionTagPrefix", "");

        byte [] bytes = config.toText().getBytes(Constants.ENCODING);

        DirCacheEntry entry = new DirCacheEntry(".gitflow");
        entry.setLength(bytes.length);
        entry.setLastModified(System.currentTimeMillis());
        entry.setFileMode(FileMode.REGULAR_FILE);
View Full Code Here


            dcEntry.setObjectId(objectId);
            dcEntry.setFileMode(FileMode.REGULAR_FILE);
            builder.add(dcEntry);
          }
        }
        String content = cfg.toText();

        // create a new DirCacheEntry for .gitmodules file.
        final DirCacheEntry dcEntry = new DirCacheEntry(Constants.DOT_GIT_MODULES);
        ObjectId objectId = inserter.insert(Constants.OBJ_BLOB,
            content.getBytes(Constants.CHARACTER_ENCODING));
View Full Code Here

    gitmodules.setString(CONFIG_SUBMODULE_SECTION, path, CONFIG_KEY_PATH,
        "sub");
    // Different config in the index should be overridden by the working tree.
    gitmodules.setString(CONFIG_SUBMODULE_SECTION, path, CONFIG_KEY_URL,
        "git://example.com/bad");
    final RevBlob gitmodulesBlob = testDb.blob(gitmodules.toText());

    gitmodules.setString(CONFIG_SUBMODULE_SECTION, path, CONFIG_KEY_URL,
        "git://example.com/sub");
    writeTrashFile(DOT_GIT_MODULES, gitmodules.toText());
View Full Code Here

        "git://example.com/bad");
    final RevBlob gitmodulesBlob = testDb.blob(gitmodules.toText());

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

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

    gitmodules.setString(CONFIG_SUBMODULE_SECTION, path, CONFIG_KEY_URL,
        "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

    gitmodules.setString(CONFIG_SUBMODULE_SECTION, path, CONFIG_KEY_URL,
        "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

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.