| Modifier and Type | Class and Description |
|---|---|
| public static class | DirCacheCheckout.
Metadata used in checkout process |
| public static interface | DirCacheCheckout.
Something that can supply an |
| Modifier and Type | Field and Description |
|---|---|
| private DirCacheBuilder | |
| private Checkout | |
| private ArrayList | |
| private DirCache | |
| private Set | |
| private boolean | |
| private boolean | |
| private ObjectId | |
| private boolean | |
| private ArrayList | |
| private static final Logger | |
| private static final int | |
| private ObjectId | |
| private ProgressMonitor | |
| private boolean | |
| private TreeSet | |
| private Repository | |
| private ArrayList | |
| private Map | |
| private NameConflictTreeWalk | |
| private WorkingTreeIterator |
| Access | Constructor and Description |
|---|---|
| public | DirCacheCheckout(Repository
the repository in which we do the checkout repo, ObjectId the id of the tree of the head commit headCommitTree, DirCache the (already locked) Dircache for this repo dc, ObjectId the id of the tree we want to fast-forward to mergeCommitTree, WorkingTreeIterator an iterator over the repositories Working Tree workingTree)Constructs a DirCacheCeckout for merging and checking out two trees (HEAD and mergeCommitTree) and the index. |
| public | DirCacheCheckout(Repository
the repository in which we do the checkout repo, ObjectId the id of the tree of the head commit headCommitTree, DirCache the (already locked) Dircache for this repo dc, ObjectId the id of the tree we want to fast-forward to mergeCommitTree)Constructs a DirCacheCeckout for merging and checking out two trees (HEAD and mergeCommitTree) and the index. |
| public | DirCacheCheckout(Repository
the repository in which we do the checkout repo, DirCache the (already locked) Dircache for this repo dc, ObjectId the id of the tree we want to fast-forward to mergeCommitTree, WorkingTreeIterator an iterator over the repositories Working Tree workingTree)Constructs a DirCacheCeckout for checking out one tree, merging with the index. |
| public | DirCacheCheckout(Repository
the repository in which we do the checkout repo, DirCache the (already locked) Dircache for this repo dc, ObjectId the id of the tree of the mergeCommitTree)Constructs a DirCacheCeckout for checking out one tree, merging with the index. |
| Modifier and Type | Method and Description |
|---|---|
| private int | |
| public boolean | Returns: false if this method could not delete all the files
which should be deleted (e.g. because one of the files was
locked). In this case getToBeDeleted() lists the files
which should be tried to be deleted outside of this method.
Although false is returned the checkout was
successful and the working tree was updated for all other files.
true is returned when no such problem occurredExecute this checkout. |
| private static void | |
| private static void | |
| private void | |
| private void | conflict(String
the path of the conflicting entry path, DirCacheEntry the previous index entry e, AbstractTreeIterator the first tree you want to merge (the HEAD) h, AbstractTreeIterator the second tree you want to merge m)A conflict is detected - add the three different stages to the index |
| private boolean | |
| private boolean | Returns: true if FileModes and ObjectIds are equal.
false otherwiseid of first object id1, FileMode mode of first object mode1, ObjectId id of second object id2, FileMode mode of second object mode2)Compares whether two pairs of ObjectId and FileMode are equal. |
| public List | Returns: a list of conflicts created by this checkoutGet a list of conflicts created by this checkout |
| public static void | getContent(Repository
the repository repo, String the path used to determine the correct filters for the object path, DirCacheCheckout.containing
checkoutMetadata,
the object loader to read raw content of the object ol, WorkingTreeOptions the working tree options where only 'core.autocrlf' is used
for EOL handling if 'checkoutMetadata.eolStreamType' is not
valid opt, OutputStream the output stream the filtered content is written to. The
caller is responsible to close the stream. os)Return filtered content for a specific object (blob). |
| public static void | getContent(Repository
the repository repo, String the path used to determine the correct filters for the object path, DirCacheCheckout.containing
checkoutMetadata,
A supplier for the raw content of the object. Each call should
yield a fresh stream of the same object. inputStream,the working tree options where only 'core.autocrlf' is used
for EOL handling if 'checkoutMetadata.eolStreamType' is not
valid opt, OutputStream the output stream the filtered content is written to. The
caller is responsible to close the stream. os)Return filtered content for blob contents. |
| public List | Returns: a list of all files removed by this checkoutGet list of all files removed by this checkout |
| public List | Returns: a list of paths (relative to the start of the working tree) of files which couldn't be deleted during last call tocheckout() . checkout() detected that these
files should be deleted but the deletion in the filesystem failed
(e.g. because a file was locked). To have a consistent state of
the working tree these files have to be deleted by the callers of
org..Get list of paths of files which couldn't be deleted during last call to
|
| public Map | Returns: a list of updated paths and smudgeFilterCommandsGet list of updated paths and smudgeFilterCommands |
| private static boolean | |
| private boolean | |
| private boolean | Returns: true if the subtrees differgiven path path, ObjectId the tree to compare tree)Checks whether the subtree starting at a given path differs between Index and some tree. |
| private boolean | Returns: true if the subtrees differgiven subtree path path)Checks whether the subtree starting at a given path differs between Index and workingtree. |
| private static boolean | |
| private void | |
| public void | |
| public void | |
| pack-priv void | processEntry(CanonicalTreeParser
the tree to merge m, DirCacheBuildIterator the index i, WorkingTreeIterator the working tree f)Processing an entry in the context of |
| pack-priv void | processEntry(CanonicalTreeParser
the entry for the head h, CanonicalTreeParser the entry for the merge m, DirCacheBuildIterator the entry for the index i, WorkingTreeIterator the file in the working tree f)Here the main work is done. |
| private void | |
| private void | |
| private static void | runBuiltinFilterCommand(Repository repo, DirCacheCheckout.
|
| private static void | runExternalFilterCommand(Repository repo, String path, DirCacheCheckout.
|
| public void | setFailOnConflict(boolean
a boolean. failOnConflict)If |
| public void | |
| public void | setProgressMonitor(ProgressMonitor
the monitor)ProgressMonitorSet a progress monitor which can be passed to built-in filter commands, providing progress information for long running tasks. |
| private void | |
| private void |
| builder | back to summary |
|---|---|
| private DirCacheBuilder builder | |
| checkout | back to summary |
|---|---|
| private Checkout checkout | |
| conflicts | back to summary |
|---|---|
| private ArrayList<String> conflicts | |
| dc | back to summary |
|---|---|
| private DirCache dc | |
| existing | back to summary |
|---|---|
| private Set<String> existing | |
| failOnConflict | back to summary |
|---|---|
| private boolean failOnConflict | |
| force | back to summary |
|---|---|
| private boolean force | |
| headCommitTree | back to summary |
|---|---|
| private ObjectId headCommitTree | |
| initialCheckout | back to summary |
|---|---|
| private boolean initialCheckout | |
| kept | back to summary |
|---|---|
| private ArrayList<String> kept | |
| LOG | back to summary |
|---|---|
| private static final Logger LOG | |
| MAX_EXCEPTION_TEXT_SIZE | back to summary |
|---|---|
| private static final int MAX_EXCEPTION_TEXT_SIZE | |
| mergeCommitTree | back to summary |
|---|---|
| private ObjectId mergeCommitTree | |
| monitor | back to summary |
|---|---|
| private ProgressMonitor monitor | |
| performingCheckout | back to summary |
|---|---|
| private boolean performingCheckout | |
| removed | back to summary |
|---|---|
| private TreeSet<String> removed | |
| repo | back to summary |
|---|---|
| private Repository repo | |
| toBeDeleted | back to summary |
|---|---|
| private ArrayList<String> toBeDeleted | |
| updated | back to summary |
|---|---|
| private Map<String, DirCacheCheckout. | |
| walk | back to summary |
|---|---|
| private NameConflictTreeWalk walk | |
| workingTree | back to summary |
|---|---|
| private WorkingTreeIterator workingTree | |
| DirCacheCheckout | back to summary |
|---|---|
| public DirCacheCheckout(Repository repo, ObjectId headCommitTree, DirCache dc, ObjectId mergeCommitTree, WorkingTreeIterator workingTree) throws IOException Constructs a DirCacheCeckout for merging and checking out two trees (HEAD and mergeCommitTree) and the index.
| |
| DirCacheCheckout | back to summary |
|---|---|
| public DirCacheCheckout(Repository repo, ObjectId headCommitTree, DirCache dc, ObjectId mergeCommitTree) throws IOException Constructs a DirCacheCeckout for merging and checking out two trees (HEAD
and mergeCommitTree) and the index. As iterator over the working tree
this constructor creates a standard
| |
| DirCacheCheckout | back to summary |
|---|---|
| public DirCacheCheckout(Repository repo, DirCache dc, ObjectId mergeCommitTree, WorkingTreeIterator workingTree) throws IOException Constructs a DirCacheCeckout for checking out one tree, merging with the index.
| |
| DirCacheCheckout | back to summary |
|---|---|
| public DirCacheCheckout(Repository repo, DirCache dc, ObjectId mergeCommitTree) throws IOException Constructs a DirCacheCeckout for checking out one tree, merging with the
index. As iterator over the working tree this constructor creates a
standard
| |
| addTree | back to summary |
|---|---|
| private int addTree(TreeWalk tw, ObjectId id) throws MissingObjectException, IncorrectObjectTypeException, IOException | |
| checkout | back to summary |
|---|---|
| public boolean checkout() throws IOException Execute this checkout. A
| |
| checkValidPath | back to summary |
|---|---|
private static void checkValidPath(CanonicalTreeParser t) throws InvalidPathException
| |
| checkValidPathSegment | back to summary |
|---|---|
| private static void checkValidPathSegment(ObjectChecker chk, CanonicalTreeParser t) throws InvalidPathException | |
| cleanUpConflicts | back to summary |
|---|---|
| private void cleanUpConflicts() throws CheckoutConflictException This method implements how to handle conflicts when
| |
| conflict | back to summary |
|---|---|
| private void conflict(String path, DirCacheEntry e, AbstractTreeIterator h, AbstractTreeIterator m) A conflict is detected - add the three different stages to the index
| |
| doCheckout | back to summary |
|---|---|
| private boolean doCheckout() throws CorruptObjectException, IOException, MissingObjectException, IncorrectObjectTypeException, CheckoutConflictException, IndexWriteException, CanceledException | |
| equalIdAndMode | back to summary |
|---|---|
| private boolean equalIdAndMode(ObjectId id1, FileMode mode1, ObjectId id2, FileMode mode2) Compares whether two pairs of ObjectId and FileMode are equal. | |
| getConflicts | back to summary |
|---|---|
| public List Get a list of conflicts created by this checkout | |
| getContent | back to summary |
|---|---|
| public static void getContent(Repository repo, String path, DirCacheCheckout. Return filtered content for a specific object (blob). EOL handling and smudge-filter handling are applied in the same way as it would be done during a checkout.
| |
| getContent | back to summary |
|---|---|
| public static void getContent(Repository repo, String path, DirCacheCheckout. Return filtered content for blob contents. EOL handling and smudge-filter handling are applied in the same way as it would be done during a checkout.
| |
| getRemoved | back to summary |
|---|---|
| public List Get list of all files removed by this checkout | |
| getToBeDeleted | back to summary |
|---|---|
| public List Get list of paths of files which couldn't be deleted during last call to
| |
| getUpdated | back to summary |
|---|---|
| public Map Get list of updated paths and smudgeFilterCommands
| |
| idEqual | back to summary |
|---|---|
| private static boolean idEqual(AbstractTreeIterator a, AbstractTreeIterator b) | |
| isModified_IndexTree | back to summary |
|---|---|
| private boolean isModified_IndexTree(String path, ObjectId iId, FileMode iMode, ObjectId tId, FileMode tMode, ObjectId rootTree) throws CorruptObjectException, IOException | |
| isModifiedSubtree_IndexTree | back to summary |
|---|---|
| private boolean isModifiedSubtree_IndexTree(String path, ObjectId tree) throws CorruptObjectException, IOException Checks whether the subtree starting at a given path differs between Index and some tree.
| |
| isModifiedSubtree_IndexWorkingtree | back to summary |
|---|---|
| private boolean isModifiedSubtree_IndexWorkingtree(String path) throws CorruptObjectException, IOException Checks whether the subtree starting at a given path differs between Index and workingtree.
| |
| isSamePrefix | back to summary |
|---|---|
| private static boolean isSamePrefix(String a, String b) | |
| keep | back to summary |
|---|---|
| private void keep(String path, DirCacheEntry e, WorkingTreeIterator f) throws IOException | |
| prescanOneTree | back to summary |
|---|---|
| public void prescanOneTree() throws MissingObjectException, IncorrectObjectTypeException, CorruptObjectException, IOException Scan index and merge tree (no HEAD). Used e.g. for initial checkout when there is no head yet.
| |
| preScanTwoTrees | back to summary |
|---|---|
| public void preScanTwoTrees() throws CorruptObjectException, IOException Scan head, index and merge tree. Used during normal checkout or merge operations.
| |
| processEntry | back to summary |
|---|---|
| pack-priv void processEntry(CanonicalTreeParser m, DirCacheBuildIterator i, WorkingTreeIterator f) throws IOException Processing an entry in the context of
| |
| processEntry | back to summary |
|---|---|
| pack-priv void processEntry(CanonicalTreeParser h, CanonicalTreeParser m, DirCacheBuildIterator i, WorkingTreeIterator f) throws IOException Here the main work is done. This method is called for each existing path in head, index and merge. This method decides what to do with the corresponding index entry: keep it, update it, remove it or mark a conflict.
| |
| remove | back to summary |
|---|---|
| private void remove(String path) | |
| removeEmptyParents | back to summary |
|---|---|
| private void removeEmptyParents(File f) | |
| runBuiltinFilterCommand | back to summary |
|---|---|
| private static void runBuiltinFilterCommand(Repository repo, DirCacheCheckout. | |
| runExternalFilterCommand | back to summary |
|---|---|
| private static void runExternalFilterCommand(Repository repo, String path, DirCacheCheckout. | |
| setFailOnConflict | back to summary |
|---|---|
| public void setFailOnConflict(boolean failOnConflict) If
| |
| setForce | back to summary |
|---|---|
| public void setForce(boolean force) If
| |
| setProgressMonitor | back to summary |
|---|---|
| public void setProgressMonitor(ProgressMonitor monitor) Set a progress monitor which can be passed to built-in filter commands, providing progress information for long running tasks.
| |
| update | back to summary |
|---|---|
| private void update(CanonicalTreeParser tree) throws IOException | |
| update | back to summary |
|---|---|
| private void update(int index, String path, ObjectId mId, FileMode mode) throws IOException | |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv static DirCacheCheckout. | |
| public final CoreConfig. | eolStreamType
git attributes |
| public final String | smudgeFilterCommand
filter command to apply |
| Access | Constructor and Description |
|---|---|
| public | CheckoutMetadata(CoreConfig.
how to convert EOL characters during stream conversion eolStreamType,command used as smudge filter during checkout smudgeFilterCommand)
|
| EMPTY | back to summary |
|---|---|
| pack-priv static DirCacheCheckout. | |
| eolStreamType | back to summary |
|---|---|
| public final CoreConfig. git attributes | |
| smudgeFilterCommand | back to summary |
|---|---|
| public final String smudgeFilterCommand filter command to apply | |
| CheckoutMetadata | back to summary |
|---|---|
public CheckoutMetadata(CoreConfig.
| |
InputStream.
| Modifier and Type | Method and Description |
|---|---|
| public InputStream |
| load | back to summary |
|---|---|
| public InputStream load() throws IOException Loads the input stream.
| |