Package org.eclipse.egit.core.op

Examples of org.eclipse.egit.core.op.AddToIndexOperation


    FileUtils.delete(gitDir, FileUtils.RECURSIVE | FileUtils.RETRY);
    testRepo = new TestRepository(gitDir);
    testRepo.connect(project.getProject());

    IFile file = testUtils.addFileToProject(project.getProject(), "file.txt", "content");
    new AddToIndexOperation(asList(file)).execute(null);

    assertTrue(testRepo.inIndex(file.getLocation().toString()));

    new RemoveFromIndexOperation(Arrays.asList(file.getLocation())).execute(null);
View Full Code Here


  @Test
  public void testDefaultMessage() throws Exception {
    IFile file = testUtils.addFileToProject(project.getProject(),
        "foo/a.txt", "some text");
    new AddToIndexOperation(Arrays.asList(file)).execute(null);
    StashCreateOperation stashCreateOperation = new StashCreateOperation(repository);
    stashCreateOperation.execute(null);

    RevWalk revWalk = new RevWalk(repository);
    RevCommit commit = revWalk.parseCommit(repository.resolve("stash@{0}"));
View Full Code Here

  @Test
  public void testCustomMessage() throws Exception {
    IFile file = testUtils.addFileToProject(project.getProject(),
        "foo/a.txt", "some text");
    new AddToIndexOperation(Arrays.asList(file)).execute(null);
    String message = "stash message";
    StashCreateOperation stashCreateOperation = new StashCreateOperation(repository, message);
    stashCreateOperation.execute(null);

    RevWalk revWalk = new RevWalk(repository);
View Full Code Here

TOP

Related Classes of org.eclipse.egit.core.op.AddToIndexOperation

Copyright © 2018 www.massapicom. 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.