org.eclipse.jgit.lib
Class WorkDirCheckout

java.lang.Object
  extended by org.eclipse.jgit.lib.WorkDirCheckout

public class WorkDirCheckout
extends java.lang.Object

This class handles checking out one or two trees merging with the index (actually a tree too). Three-way merges are no performed. See setFailOnConflict(boolean).


Constructor Summary
WorkDirCheckout(Repository repo, java.io.File root, GitIndex index, Tree merge)
          Create a checkout class for checking out one tree, merging with the index
WorkDirCheckout(Repository repo, java.io.File root, Tree head, GitIndex index, Tree merge)
          Create a checkout class for merging and checking our two trees and the index.
 
Method Summary
 void checkout()
          Execute this checkout
 java.util.ArrayList<java.lang.String> getConflicts()
           
 java.util.ArrayList<java.lang.String> getRemoved()
           
 void setFailOnConflict(boolean failOnConflict)
          If true, will scan first to see if it's possible to check out, otherwise throw CheckoutConflictException.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WorkDirCheckout

public WorkDirCheckout(Repository repo,
                       java.io.File root,
                       GitIndex index,
                       Tree merge)
Create a checkout class for checking out one tree, merging with the index

Parameters:
repo -
root - workdir
index - current index
merge - tree to check out

WorkDirCheckout

public WorkDirCheckout(Repository repo,
                       java.io.File root,
                       Tree head,
                       GitIndex index,
                       Tree merge)
Create a checkout class for merging and checking our two trees and the index.

Parameters:
repo -
root - workdir
head -
index -
merge -
Method Detail

setFailOnConflict

public void setFailOnConflict(boolean failOnConflict)
If true, will scan first to see if it's possible to check out, otherwise throw CheckoutConflictException. If false, it will silently deal with the problem.

Parameters:
failOnConflict -

checkout

public void checkout()
              throws java.io.IOException
Execute this checkout

Throws:
java.io.IOException

getConflicts

public java.util.ArrayList<java.lang.String> getConflicts()
Returns:
a list of conflicts created by this checkout

getRemoved

public java.util.ArrayList<java.lang.String> getRemoved()
Returns:
a list of all files removed by this checkout