Package org.eclipse.jgit.api

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


    Git git = new Git(db);
    writeTrashFile("a", "Hello world a");
    writeTrashFile("b", "Hello world b");
    git.add().addFilepattern(".").call();
    git.commit().setMessage("add files a & b").call();
    Ref branch_1 = git.branchCreate().setName("branch_1").call();
    git.rm().addFilepattern("a").call();
    FileUtils.createSymLink(new File(db.getWorkTree(), "a"), "b");
    git.add().addFilepattern("a").call();
    git.commit().setMessage("add symlink a").call();
View Full Code Here


    Git git = new Git(db);
    writeTrashFile("b", "Hello world b");
    FileUtils.createSymLink(new File(db.getWorkTree(), "a"), "b");
    git.add().addFilepattern(".").call();
    git.commit().setMessage("add file b & symlink a").call();
    Ref branch_1 = git.branchCreate().setName("branch_1").call();
    git.rm().addFilepattern("a").call();
    writeTrashFile("a", "Hello world a");
    git.add().addFilepattern("a").call();
    git.commit().setMessage("add file a").call();
View Full Code Here

    FileUtils.mkdirs(new File(db.getWorkTree(), "a"));
    writeTrashFile("a/b", "Hello world b");
    writeTrashFile("c", "Hello world c");
    git.add().addFilepattern(".").call();
    git.commit().setMessage("add folder a").call();
    Ref branch_1 = git.branchCreate().setName("branch_1").call();
    git.rm().addFilepattern("a").call();
    FileUtils.createSymLink(new File(db.getWorkTree(), "a"), "c");
    git.add().addFilepattern("a").call();
    git.commit().setMessage("add symlink a").call();
View Full Code Here

    Git git = new Git(db);
    writeTrashFile("c", "Hello world c");
    FileUtils.createSymLink(new File(db.getWorkTree(), "a"), "c");
    git.add().addFilepattern(".").call();
    git.commit().setMessage("add symlink a").call();
    Ref branch_1 = git.branchCreate().setName("branch_1").call();
    git.rm().addFilepattern("a").call();
    FileUtils.mkdirs(new File(db.getWorkTree(), "a"));
    writeTrashFile("a/b", "Hello world b");
    git.add().addFilepattern("a").call();
    git.commit().setMessage("add folder a").call();
View Full Code Here

  public void fileModeTestMissingThenSymlink() throws Exception {
    Git git = new Git(db);
    writeTrashFile("b", "Hello world b");
    git.add().addFilepattern(".").call();
    RevCommit commit1 = git.commit().setMessage("add file b").call();
    Ref branch_1 = git.branchCreate().setName("branch_1").call();
    FileUtils.createSymLink(new File(db.getWorkTree(), "a"), "b");
    git.add().addFilepattern("a").call();
    RevCommit commit2 = git.commit().setMessage("add symlink a").call();

    git.checkout().setName(branch_1.getName()).call();
View Full Code Here

    writeTrashFile("b", "Hello world b");
    FileUtils.createSymLink(new File(db.getWorkTree(), "a"), "b");
    git.add().addFilepattern(".").call();
    RevCommit commit1 = git.commit().setMessage("add file b & symlink a")
        .call();
    Ref branch_1 = git.branchCreate().setName("branch_1").call();
    git.rm().addFilepattern("a").call();
    RevCommit commit2 = git.commit().setMessage("delete symlink a").call();

    git.checkout().setName(branch_1.getName()).call();
View Full Code Here

  public void testCheckoutExistingBranchWithConflict() throws Exception {
    Git git = new Git(db);
    writeTrashFile("a", "Hello world a");
    git.add().addFilepattern(".").call();
    git.commit().setMessage("commit file a").call();
    git.branchCreate().setName("branch_1").call();
    git.rm().addFilepattern("a").call();
    FileUtils.mkdirs(new File(db.getWorkTree(), "a"));
    writeTrashFile("a/b", "Hello world b");
    git.add().addFilepattern("a/b").call();
    git.commit().setMessage("commit folder a").call();
View Full Code Here

    Git git = new Git(db);
    File fileA = writeTrashFile("a", "Hello world a");
    writeTrashFile("b", "Hello world b");
    git.add().addFilepattern(".").call();
    git.commit().setMessage("add files a & b").call();
    Ref branch_1 = git.branchCreate().setName("branch_1").call();
    writeTrashFile("a", "b");
    git.add().addFilepattern("a").call();
    git.commit().setMessage("modify file a").call();

    FileEntry entry = new FileTreeIterator.FileEntry(new File(
View Full Code Here

      throws Exception {
    Git git = new Git(db);
    writeTrashFile("b", "Hello world b");
    git.add().addFilepattern(".").call();
    git.commit().setMessage("add file b").call();
    Ref branch_1 = git.branchCreate().setName("branch_1").call();
    File folderA = new File(db.getWorkTree(), "a");
    FileUtils.mkdirs(folderA);
    writeTrashFile("a/c", "Hello world c");
    git.add().addFilepattern(".").call();
    git.commit().setMessage("add folder a").call();
View Full Code Here

    Git git = new Git(db);
    writeTrashFile("b", "Hello world b");
    writeTrashFile("a", "b");
    git.add().addFilepattern(".").call();
    git.commit().setMessage("add file b & file a").call();
    Ref branch_1 = git.branchCreate().setName("branch_1").call();
    git.rm().addFilepattern("a").call();
    File folderA = new File(db.getWorkTree(), "a");
    FileUtils.mkdirs(folderA);
    writeTrashFile("a/c", "Hello world c");
    git.add().addFilepattern(".").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.