Package org.eclipse.jgit.api

Examples of org.eclipse.jgit.api.Git.checkout()


        .add("f", "1-master-r\n2\n3-side\n")
        .message("m2(merge)")
        .create();

    Git git = Git.wrap(db);
    git.checkout().setName("master").call();
    modifyWorktree(worktreeState, "f", "side");
    modifyIndex(indexState, "f", "side");

    ResolveMerger merger = (ResolveMerger) strategy.newMerger(db,
        worktreeState == WorktreeState.Bare);
View Full Code Here


    RevCommit m2 = master.commit().parent(s1)
        .add("f", "1\nx(side)\n2\n3\ny(side)\n").message("m2(merge)")
        .create();

    Git git = Git.wrap(db);
    git.checkout().setName("master").call();
    modifyWorktree(worktreeState, "f", "side");
    modifyIndex(indexState, "f", "side");

    ResolveMerger merger = (ResolveMerger) strategy.newMerger(db,
        worktreeState == WorktreeState.Bare);
View Full Code Here

    RevCommit m2 = master.commit().parent(s1)
        .add("f", "1-master-r\n2\n3-side\n").add("s.m", "1")
        .add("s.c", "0").rm("s.d").message("m2(merge)").create();

    Git git = Git.wrap(db);
    git.checkout().setName("master").call();
    modifyWorktree(worktreeState, "f", "side");
    modifyIndex(indexState, "f", "side");

    ResolveMerger merger = (ResolveMerger) strategy.newMerger(db,
        worktreeState == WorktreeState.Bare);
View Full Code Here

    RevCommit m2 = master.commit().parent(s1)
        .add("f", "1-master\n2\n3\n4\n5\n6\n7-conflict\n8\n9-side\n")
        .message("m2(merge)").create();

    Git git = Git.wrap(db);
    git.checkout().setName("master").call();
    modifyWorktree(worktreeState, "f", "side");
    modifyIndex(indexState, "f", "side");

    ResolveMerger merger = (ResolveMerger) strategy.newMerger(db,
        worktreeState == WorktreeState.Bare);
View Full Code Here

        .add("f",
            "1-master\n2\n3\n4\n5-other\n6\n7-res(side)\n8\n9-side\n")
        .message("s2(merge)").create();

    Git git = Git.wrap(db);
    git.checkout().setName("master").call();
    modifyWorktree(worktreeState, "f", "side");
    modifyIndex(indexState, "f", "side");

    ResolveMerger merger = (ResolveMerger) strategy.newMerger(db,
        worktreeState == WorktreeState.Bare);
View Full Code Here

    writeTrashFile("d/1", "1master\n2\n3");
    RevCommit masterCommit = git.commit().setAll(true)
        .setMessage("modified d/1 on master").call();

    git.checkout().setCreateBranch(true).setStartPoint(first)
        .setName("side").call();
    writeTrashFile("d/1", "1\n2\n3side");
    git.commit().setAll(true).setMessage("modified d/1 on side").call();

    git.rm().addFilepattern("d/1").call();
View Full Code Here

    writeTrashFile("e/1", "4");
    git.add().addFilepattern("e/1").call();
    RevCommit masterCommit = git.commit().setMessage("added e/1").call();

    git.checkout().setCreateBranch(true).setStartPoint(first)
        .setName("side").call();
    writeTrashFile("f/1", "5");
    git.add().addFilepattern("f/1").call();
    git.commit().setAll(true).setMessage("added f/1")
        .call();
View Full Code Here

    writeTrashFile("e", "4");
    git.add().addFilepattern("e").call();
    RevCommit masterCommit = git.commit().setMessage("added e").call();

    git.checkout().setCreateBranch(true).setStartPoint(first)
        .setName("side").call();
    writeTrashFile("f/1", "5");
    git.add().addFilepattern("f/1").call();
    git.commit().setAll(true).setMessage("added f/1").call();
View Full Code Here

    writeTrashFile("crlf.txt", "some\r\nmore\r\ndata\r\n");
    git.add().addFilepattern("crlf.txt").call();
    git.commit().setMessage("on master").call();

    git.checkout().setName("brancha").call();
    writeTrashFile("crlf.txt", "some\r\ndata\r\ntoo\r\n");
    git.add().addFilepattern("crlf.txt").call();
    git.commit().setMessage("on brancha").call();

    db.getConfig().setString("core", null, "autocrlf", "input");
View Full Code Here

    writeTrashFile("d/1", "modified");
    RevCommit masterCommit = git.commit().setAll(true)
        .setMessage("modified d/1 on master").call();

    git.checkout().setCreateBranch(true).setStartPoint(first)
        .setName("side").call();
    writeTrashFile("d/1", "modified");
    git.commit().setAll(true).setMessage("modified d/1 on side").call();

    git.rm().addFilepattern("d/1").call();
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.