return bol;
}
+ /** {@inheritDoc} */
@Override
public void write(int val) throws IOException {
out.write(val);
bol = (val == '\n');
}
+ /** {@inheritDoc} */
@Override
public void write(byte[] buf, int pos, int cnt) throws IOException {
if (cnt > 0) {
/**
* Provides the merge algorithm which does a three-way merge on content provided
- * as RawText. By default {@link HistogramDiff} is used as diff algorithm.
+ * as RawText. By default {@link org.eclipse.jgit.diff.HistogramDiff} is used as
+ * diff algorithm.
*/
public final class MergeAlgorithm {
private final DiffAlgorithm diffAlg;
/**
- * Creates a new MergeAlgorithm which uses {@link HistogramDiff} as diff
- * algorithm
+ * Creates a new MergeAlgorithm which uses
+ * {@link org.eclipse.jgit.diff.HistogramDiff} as diff algorithm
*/
public MergeAlgorithm() {
this(new HistogramDiff());
/**
* Does the three way merge between a common base and two sequences.
*
- * @param <S>
- * type of sequence.
* @param cmp comparison method for this execution.
* @param base the common base sequence
* @param ours the first sequence to be merged
* merge result. All elements between begin (including begin) and
* this element are added.
* @param conflictState
- * the state of this chunk. See {@link ConflictState}
+ * the state of this chunk. See
+ * {@link org.eclipse.jgit.merge.MergeChunk.ConflictState}
*/
protected MergeChunk(int sequenceIndex, int begin, int end,
ConflictState conflictState) {
}
/**
- * @return the index of the sequence to which sequence this chunks belongs
+ * Get the index of the sequence to which this sequence chunks belongs to.
+ *
+ * @return the index of the sequence to which this sequence chunks belongs
* to. Same as in {@link org.eclipse.jgit.merge.MergeResult#add}
*/
public int getSequenceIndex() {
}
/**
+ * Get the first element from the specified sequence which should be
+ * included in the merge result.
+ *
* @return the first element from the specified sequence which should be
* included in the merge result. Indexes start with 0.
*/
}
/**
- * @return the end of the range of this chunk. The element this index
- * points to is the first element which not added to the merge
- * result. All elements between begin (including begin) and this
- * element are added.
+ * Get the end of the range of this chunk.
+ *
+ * @return the end of the range of this chunk. The element this index points
+ * to is the first element which not added to the merge result. All
+ * elements between begin (including begin) and this element are
+ * added.
*/
public int getEnd() {
return end;
}
/**
- * @return the state of this chunk. See {@link ConflictState}
+ * Get the state of this chunk.
+ *
+ * @return the state of this chunk. See
+ * {@link org.eclipse.jgit.merge.MergeChunk.ConflictState}
*/
public ConflictState getConflictState() {
return conflictState;
public class MergeConfig {
/**
+ * Get merge configuration for the current branch of the repository
+ *
* @param repo
+ * a {@link org.eclipse.jgit.lib.Repository} object.
* @return merge configuration for the current branch of the repository
*/
public static MergeConfig getConfigForCurrentBranch(Repository repo) {
}
/**
+ * Get a parser for use with
+ * {@link org.eclipse.jgit.lib.Config#get(SectionParser)}
+ *
* @param branch
* short branch name to get the configuration for, as returned
- * e.g. by {@link Repository#getBranch()}
- * @return a parser for use with {@link Config#get(SectionParser)}
+ * e.g. by {@link org.eclipse.jgit.lib.Repository#getBranch()}
+ * @return a parser for use with
+ * {@link org.eclipse.jgit.lib.Config#get(SectionParser)}
*/
public static final SectionParser<MergeConfig> getParser(
final String branch) {
}
/**
+ * Get the fast forward mode configured for this branch
+ *
* @return the fast forward mode configured for this branch
*/
public FastForwardMode getFastForwardMode() {
}
/**
+ * Whether merges into this branch are configured to be squash merges, false
+ * otherwise
+ *
* @return true if merges into this branch are configured to be squash
* merges, false otherwise
*/
}
/**
- * @return false if --no-commit is configured for this branch, true
- * otherwise (event if --squash is configured)
+ * Whether {@code --no-commit} option is not set.
+ *
+ * @return {@code false} if --no-commit is configured for this branch,
+ * {@code true} otherwise (even if --squash is configured)
*/
public boolean isCommit() {
return commit;
*/
public class MergeFormatter {
/**
- * Formats the results of a merge of {@link RawText} objects in a Git
- * conformant way. This method also assumes that the {@link RawText} objects
- * being merged are line oriented files which use LF as delimiter. This
- * method will also use LF to separate chunks and conflict metadata,
- * therefore it fits only to texts that are LF-separated lines.
+ * Formats the results of a merge of {@link org.eclipse.jgit.diff.RawText}
+ * objects in a Git conformant way. This method also assumes that the
+ * {@link org.eclipse.jgit.diff.RawText} objects being merged are line
+ * oriented files which use LF as delimiter. This method will also use LF to
+ * separate chunks and conflict metadata, therefore it fits only to texts
+ * that are LF-separated lines.
*
* @param out
* the outputstream where to write the textual presentation
* the merge result which should be presented
* @param seqName
* When a conflict is reported each conflicting range will get a
- * name. This name is following the "<<<<<<< " or ">>>>>>> "
- * conflict markers. The names for the sequences are given in
- * this list
+ * name. This name is following the "<<<<<<<
+ * " or ">>>>>>> " conflict markers. The
+ * names for the sequences are given in this list
* @param charsetName
* the name of the characterSet used when writing conflict
* metadata
- * @throws IOException
+ * @throws java.io.IOException
*/
public void formatMerge(OutputStream out, MergeResult<RawText> res,
List<String> seqName, String charsetName) throws IOException {
}
/**
- * Formats the results of a merge of exactly two {@link RawText} objects in
- * a Git conformant way. This convenience method accepts the names for the
- * three sequences (base and the two merged sequences) as explicit
- * parameters and doesn't require the caller to specify a List
+ * Formats the results of a merge of exactly two
+ * {@link org.eclipse.jgit.diff.RawText} objects in a Git conformant way.
+ * This convenience method accepts the names for the three sequences (base
+ * and the two merged sequences) as explicit parameters and doesn't require
+ * the caller to specify a List
*
* @param out
- * the {@link OutputStream} where to write the textual
+ * the {@link java.io.OutputStream} where to write the textual
* presentation
* @param res
* the merge result which should be presented
* @param charsetName
* the name of the characterSet used when writing conflict
* metadata
- * @throws IOException
+ * @throws java.io.IOException
*/
@SuppressWarnings("unchecked")
public void formatMerge(OutputStream out, MergeResult res, String baseName,
import org.eclipse.jgit.util.IntList;
/**
- * The result of merging a number of {@link Sequence} objects. These sequences
- * have one common predecessor sequence. The result of a merge is a list of
- * MergeChunks. Each MergeChunk contains either a range (a subsequence) from
- * one of the merged sequences, a range from the common predecessor or a
- * conflicting range from one of the merged sequences. A conflict will be
- * reported as multiple chunks, one for each conflicting range. The first chunk
- * for a conflict is marked specially to distinguish the border between two
- * consecutive conflicts.
+ * The result of merging a number of {@link org.eclipse.jgit.diff.Sequence}
+ * objects. These sequences have one common predecessor sequence. The result of
+ * a merge is a list of MergeChunks. Each MergeChunk contains either a range (a
+ * subsequence) from one of the merged sequences, a range from the common
+ * predecessor or a conflicting range from one of the merged sequences. A
+ * conflict will be reported as multiple chunks, one for each conflicting range.
+ * The first chunk for a conflict is marked specially to distinguish the border
+ * between two consecutive conflicts.
* <p>
* This class does not know anything about how to present the merge result to
* the end-user. MergeFormatters have to be used to construct something human
* @param sequences
* contains the common predecessor sequence at position 0
* followed by the merged sequences. This list should not be
- * modified anymore during the lifetime of this {@link MergeResult}.
+ * modified anymore during the lifetime of this
+ * {@link org.eclipse.jgit.merge.MergeResult}.
*/
public MergeResult(List<S> sequences) {
this.sequences = sequences;
static final ConflictState[] states = ConflictState.values();
- /**
- * @return an iterator over the MergeChunks. The iterator does not support
- * the remove operation
- */
+ /** {@inheritDoc} */
@Override
public Iterator<MergeChunk> iterator() {
return new Iterator<MergeChunk>() {
}
/**
+ * Whether this merge result contains conflicts
+ *
* @return true if this merge result contains conflicts
*/
public boolean containsConflicts() {
* markers!) as new conflict-free content
*
* @param containsConflicts
+ * whether this merge should be seen as containing a conflict or
+ * not.
* @since 3.5
*/
protected void setContainsConflicts(boolean containsConflicts) {
*
* @param imp
* the strategy to register.
- * @throws IllegalArgumentException
+ * @throws java.lang.IllegalArgumentException
* a strategy by the same name has already been registered.
*/
public static void register(final MergeStrategy imp) {
* name the strategy can be looked up under.
* @param imp
* the strategy to register.
- * @throws IllegalArgumentException
+ * @throws java.lang.IllegalArgumentException
* a strategy by the same name has already been registered.
*/
public static synchronized void register(final String name,
return r;
}
- /** @return default name of this strategy implementation. */
+ /**
+ * Get default name of this strategy implementation.
+ *
+ * @return default name of this strategy implementation.
+ */
public abstract String getName();
/**
import org.eclipse.jgit.treewalk.CanonicalTreeParser;
/**
- * Instance of a specific {@link MergeStrategy} for a single {@link Repository}.
+ * Instance of a specific {@link org.eclipse.jgit.merge.MergeStrategy} for a
+ * single {@link org.eclipse.jgit.lib.Repository}.
*/
public abstract class Merger {
/**
}
/**
+ * Get the repository this merger operates on.
+ *
* @return the repository this merger operates on.
*/
@Nullable
}
/**
+ * Get non-null repository instance
+ *
* @return non-null repository instance
- * @throws NullPointerException
+ * @throws java.lang.NullPointerException
* if the merger was constructed without a repository.
* @since 4.8
*/
}
/**
- * @return an object writer to create objects, writing objects to {@link
- * #getRepository()} (if a repository was provided).
+ * Get an object writer to create objects, writing objects to
+ * {@link #getRepository()}
+ *
+ * @return an object writer to create objects, writing objects to
+ * {@link #getRepository()} (if a repository was provided).
*/
public ObjectInserter getObjectInserter() {
return inserter;
* @throws IncorrectObjectTypeException
* one of the input objects is not a commit, but the strategy
* requires it to be a commit.
- * @throws IOException
+ * @throws java.io.IOException
* one or more sources could not be read, or outputs could not
* be written to the Repository.
*/
* @throws IncorrectObjectTypeException
* one of the input objects is not a commit, but the strategy
* requires it to be a commit.
- * @throws IOException
+ * @throws java.io.IOException
* one or more sources could not be read, or outputs could not
* be written to the Repository.
*/
}
/**
+ * Get the ID of the commit that was used as merge base for merging
+ *
* @return the ID of the commit that was used as merge base for merging, or
* null if no merge base was used or it was set manually
* @since 3.2
* @param b
* the second commit in {@link #sourceObjects}.
* @return the merge base of two commits
- * @throws IncorrectObjectTypeException
+ * @throws org.eclipse.jgit.errors.IncorrectObjectTypeException
* one of the input objects is not a commit.
- * @throws IOException
+ * @throws java.io.IOException
* objects are missing or multiple merge bases were found.
* @since 3.0
*/
* @param treeId
* the tree to scan; must be a tree (not a treeish).
* @return an iterator for the tree.
- * @throws IncorrectObjectTypeException
+ * @throws org.eclipse.jgit.errors.IncorrectObjectTypeException
* the input object is not a tree.
- * @throws IOException
+ * @throws java.io.IOException
* the tree object is not found or cannot be read.
*/
protected AbstractTreeIterator openTree(final AnyObjectId treeId)
* @throws IncorrectObjectTypeException
* one of the input objects is not a commit, but the strategy
* requires it to be a commit.
- * @throws IOException
+ * @throws java.io.IOException
* one or more sources could not be read, or outputs could not
* be written to the Repository.
*/
protected abstract boolean mergeImpl() throws IOException;
/**
+ * Get resulting tree.
+ *
* @return resulting tree, if {@link #merge(AnyObjectId[])} returned true.
*/
public abstract ObjectId getResultTreeId();
* - uses "Lists" instead of Arrays for chained types
*
* - recursively merges the merge bases together to compute a usable base
+ *
* @since 3.0
*/
public class RecursiveMerger extends ResolveMerger {
* inCore
*
* @param local
+ * a {@link org.eclipse.jgit.lib.Repository} object.
* @param inCore
+ * a boolean.
*/
protected RecursiveMerger(Repository local, boolean inCore) {
super(local, inCore);
/**
* Normal recursive merge, implies not inCore
*
- * @param local
+ * @param local a {@link org.eclipse.jgit.lib.Repository} object.
*/
protected RecursiveMerger(Repository local) {
this(local, false);
* Normal recursive merge, implies inCore.
*
* @param inserter
+ * an {@link org.eclipse.jgit.lib.ObjectInserter} object.
* @param config
+ * the repository configuration
* @since 4.8
*/
protected RecursiveMerger(ObjectInserter inserter, Config config) {
}
/**
+ * {@inheritDoc}
+ * <p>
* Get a single base commit for two given commits. If the two source commits
* have more than one base commit recursively merge the base commits
* together until you end up with a single base commit.
- *
- * @throws IOException
- * @throws IncorrectObjectTypeException
*/
@Override
protected RevCommit getBaseCommit(RevCommit a, RevCommit b)
* @return the merge base of two commits. If a criss-cross merge required a
* synthetic merge base this commit is visible only the merger's
* RevWalk and will not be in the repository.
- * @throws IOException
+ * @throws java.io.IOException
* @throws IncorrectObjectTypeException
* one of the input objects is not a commit.
* @throws NoMergeBaseException
}
/**
+ * Constructor for ResolveMerger.
+ *
* @param local
+ * the {@link org.eclipse.jgit.lib.Repository}.
* @param inCore
+ * a boolean.
*/
protected ResolveMerger(Repository local, boolean inCore) {
super(local);
}
/**
+ * Constructor for ResolveMerger.
+ *
* @param local
+ * the {@link org.eclipse.jgit.lib.Repository}.
*/
protected ResolveMerger(Repository local) {
this(local, false);
}
/**
+ * Constructor for ResolveMerger.
+ *
* @param inserter
+ * an {@link org.eclipse.jgit.lib.ObjectInserter} object.
* @param config
+ * the repository configuration
* @since 4.8
*/
protected ResolveMerger(ObjectInserter inserter, Config config) {
dircache = DirCache.newInCore();
}
+ /** {@inheritDoc} */
@Override
protected boolean mergeImpl() throws IOException {
if (implicitDirCache)
* contained only stage 0. In case if inCore operation just clear the
* history of modified files.
*
- * @throws IOException
- * @throws CorruptObjectException
- * @throws NoWorkTreeException
+ * @throws java.io.IOException
+ * @throws org.eclipse.jgit.errors.CorruptObjectException
+ * @throws org.eclipse.jgit.errors.NoWorkTreeException
* @since 3.4
*/
protected void cleanUp() throws NoWorkTreeException,
* the file in the working tree
* @param ignoreConflicts
* see
- * {@link ResolveMerger#mergeTrees(AbstractTreeIterator, RevTree, RevTree, boolean)}
+ * {@link org.eclipse.jgit.merge.ResolveMerger#mergeTrees(AbstractTreeIterator, RevTree, RevTree, boolean)}
* @return <code>false</code> if the merge will fail because the index entry
* didn't match ours or the working-dir file was dirty and a
* conflict occurred
- * @throws MissingObjectException
- * @throws IncorrectObjectTypeException
- * @throws CorruptObjectException
- * @throws IOException
+ * @throws org.eclipse.jgit.errors.MissingObjectException
+ * @throws org.eclipse.jgit.errors.IncorrectObjectTypeException
+ * @throws org.eclipse.jgit.errors.CorruptObjectException
+ * @throws java.io.IOException
* @since 3.5
- * @deprecated
*/
@Deprecated
protected boolean processEntry(CanonicalTreeParser base,
* the file in the working tree
* @param ignoreConflicts
* see
- * {@link ResolveMerger#mergeTrees(AbstractTreeIterator, RevTree, RevTree, boolean)}
+ * {@link org.eclipse.jgit.merge.ResolveMerger#mergeTrees(AbstractTreeIterator, RevTree, RevTree, boolean)}
* @param attributes
* the attributes defined for this entry
* @return <code>false</code> if the merge will fail because the index entry
* didn't match ours or the working-dir file was dirty and a
* conflict occurred
- * @throws MissingObjectException
- * @throws IncorrectObjectTypeException
- * @throws CorruptObjectException
- * @throws IOException
+ * @throws org.eclipse.jgit.errors.MissingObjectException
+ * @throws org.eclipse.jgit.errors.IncorrectObjectTypeException
+ * @throws org.eclipse.jgit.errors.CorruptObjectException
+ * @throws java.io.IOException
* @since 4.9
*/
protected boolean processEntry(CanonicalTreeParser base,
return FileMode.GITLINK.equals(mode);
}
+ /** {@inheritDoc} */
@Override
public ObjectId getResultTreeId() {
return (resultTree == null) ? null : resultTree.toObjectId();
}
/**
+ * Set the names of the commits as they would appear in conflict markers
+ *
* @param commitNames
* the names of the commits as they would appear in conflict
* markers
}
/**
+ * Get the names of the commits as they would appear in conflict markers.
+ *
* @return the names of the commits as they would appear in conflict
* markers.
*/
}
/**
- * @return the paths with conflicts. This is a subset of the files listed
- * by {@link #getModifiedFiles()}
+ * Get the paths with conflicts. This is a subset of the files listed by
+ * {@link #getModifiedFiles()}
+ *
+ * @return the paths with conflicts. This is a subset of the files listed by
+ * {@link #getModifiedFiles()}
*/
public List<String> getUnmergedPaths() {
return unmergedPaths;
}
/**
- * @return the paths of files which have been modified by this merge. A
- * file will be modified if a content-merge works on this path or if
- * the merge algorithm decides to take the theirs-version. This is a
+ * Get the paths of files which have been modified by this merge.
+ *
+ * @return the paths of files which have been modified by this merge. A file
+ * will be modified if a content-merge works on this path or if the
+ * merge algorithm decides to take the theirs-version. This is a
* superset of the files listed by {@link #getUnmergedPaths()}.
*/
public List<String> getModifiedFiles() {
}
/**
+ * Get a map which maps the paths of files which have to be checked out
+ * because the merge created new fully-merged content for this file into the
+ * index.
+ *
* @return a map which maps the paths of files which have to be checked out
* because the merge created new fully-merged content for this file
* into the index. This means: the merge wrote a new stage 0 entry
}
/**
+ * Get the mergeResults
+ *
* @return the mergeResults
*/
public Map<String, MergeResult<? extends Sequence>> getMergeResults() {
}
/**
+ * Get list of paths causing this merge to fail (not stopped because of a
+ * conflict).
+ *
* @return lists paths causing this merge to fail (not stopped because of a
* conflict). <code>null</code> is returned if this merge didn't
* fail.
* not set explicitly and if this merger doesn't work in-core, this merger
* will implicitly get and lock a default DirCache. If the DirCache is
* explicitly set the caller is responsible to lock it in advance. Finally
- * the merger will call {@link DirCache#commit()} which requires that the
- * DirCache is locked. If the {@link #mergeImpl()} returns without throwing
- * an exception the lock will be released. In case of exceptions the caller
- * is responsible to release the lock.
+ * the merger will call {@link org.eclipse.jgit.dircache.DirCache#commit()}
+ * which requires that the DirCache is locked. If the {@link #mergeImpl()}
+ * returns without throwing an exception the lock will be released. In case
+ * of exceptions the caller is responsible to release the lock.
*
* @param dc
* the DirCache to set
* The resolve conflict way of three way merging
*
* @param baseTree
+ * a {@link org.eclipse.jgit.treewalk.AbstractTreeIterator}
+ * object.
* @param headTree
+ * a {@link org.eclipse.jgit.revwalk.RevTree} object.
* @param mergeTree
+ * a {@link org.eclipse.jgit.revwalk.RevTree} object.
* @param ignoreConflicts
* Controls what to do in case a content-merge is done and a
* conflict is detected. The default setting for this should be
* other stages are filled. Means: there is no conflict on that
* path but the new content (including conflict markers) is
* stored as successful merge result. This is needed in the
- * context of {@link RecursiveMerger} where when determining
- * merge bases we don't want to deal with content-merge
- * conflicts.
+ * context of {@link org.eclipse.jgit.merge.RecursiveMerger}
+ * where when determining merge bases we don't want to deal with
+ * content-merge conflicts.
* @return whether the trees merged cleanly
- * @throws IOException
+ * @throws java.io.IOException
* @since 3.5
*/
protected boolean mergeTrees(AbstractTreeIterator baseTree,
* The walk to iterate over.
* @param ignoreConflicts
* see
- * {@link ResolveMerger#mergeTrees(AbstractTreeIterator, RevTree, RevTree, boolean)}
+ * {@link org.eclipse.jgit.merge.ResolveMerger#mergeTrees(AbstractTreeIterator, RevTree, RevTree, boolean)}
* @return Whether the trees merged cleanly.
- * @throws IOException
+ * @throws java.io.IOException
* @since 3.5
*/
protected boolean mergeTreeWalk(TreeWalk treeWalk, boolean ignoreConflicts)
treeIndex = index;
}
+ /** {@inheritDoc} */
@Override
public String getName() {
return strategyName;
}
+ /** {@inheritDoc} */
@Override
public Merger newMerger(final Repository db) {
return new OneSide(db, treeIndex);
}
+ /** {@inheritDoc} */
@Override
public Merger newMerger(final Repository db, boolean inCore) {
return new OneSide(db, treeIndex);
}
+ /** {@inheritDoc} */
@Override
public Merger newMerger(final ObjectInserter inserter, final Config config) {
return new OneSide(inserter, treeIndex);
*/
public class StrategyRecursive extends StrategyResolve {
+ /** {@inheritDoc} */
@Override
public ThreeWayMerger newMerger(Repository db) {
return new RecursiveMerger(db, false);
}
+ /** {@inheritDoc} */
@Override
public ThreeWayMerger newMerger(Repository db, boolean inCore) {
return new RecursiveMerger(db, inCore);
}
+ /** {@inheritDoc} */
@Override
public ThreeWayMerger newMerger(ObjectInserter inserter, Config config) {
return new RecursiveMerger(inserter, config);
}
+ /** {@inheritDoc} */
@Override
public String getName() {
return "recursive"; //$NON-NLS-1$
*/
public class StrategyResolve extends ThreeWayMergeStrategy {
+ /** {@inheritDoc} */
@Override
public ThreeWayMerger newMerger(Repository db) {
return new ResolveMerger(db, false);
}
+ /** {@inheritDoc} */
@Override
public ThreeWayMerger newMerger(Repository db, boolean inCore) {
return new ResolveMerger(db, inCore);
}
- /**
- * @since 4.8
- */
+ /** {@inheritDoc} */
@Override
public ThreeWayMerger newMerger(ObjectInserter inserter, Config config) {
return new ResolveMerger(inserter, config);
}
+ /** {@inheritDoc} */
@Override
public String getName() {
return "resolve"; //$NON-NLS-1$
* file contents.
*/
public class StrategySimpleTwoWayInCore extends ThreeWayMergeStrategy {
- /** Create a new instance of the strategy. */
+ /**
+ * Create a new instance of the strategy.
+ */
protected StrategySimpleTwoWayInCore() {
//
}
+ /** {@inheritDoc} */
@Override
public String getName() {
return "simple-two-way-in-core"; //$NON-NLS-1$
}
+ /** {@inheritDoc} */
@Override
public ThreeWayMerger newMerger(final Repository db) {
return new InCoreMerger(db);
}
+ /** {@inheritDoc} */
@Override
public ThreeWayMerger newMerger(Repository db, boolean inCore) {
// This class is always inCore, so ignore the parameter
return newMerger(db);
}
- /**
- * @since 4.8
- */
+ /** {@inheritDoc} */
@Override
public ThreeWayMerger newMerger(ObjectInserter inserter, Config config) {
return new InCoreMerger(inserter);
import org.eclipse.jgit.lib.Repository;
-/** A merge strategy to merge 2 trees, using a common base ancestor tree. */
+/**
+ * A merge strategy to merge 2 trees, using a common base ancestor tree.
+ */
public abstract class ThreeWayMergeStrategy extends MergeStrategy {
+ /** {@inheritDoc} */
@Override
public abstract ThreeWayMerger newMerger(Repository db);
+ /** {@inheritDoc} */
@Override
public abstract ThreeWayMerger newMerger(Repository db, boolean inCore);
}
import org.eclipse.jgit.treewalk.AbstractTreeIterator;
import org.eclipse.jgit.treewalk.EmptyTreeIterator;
-/** A merge of 2 trees, using a common base ancestor tree. */
+/**
+ * A merge of 2 trees, using a common base ancestor tree.
+ */
public abstract class ThreeWayMerger extends Merger {
private RevTree baseTree;
* common base treeish; null to automatically compute the common
* base from the input commits during
* {@link #merge(AnyObjectId...)}.
- * @throws IncorrectObjectTypeException
+ * @throws org.eclipse.jgit.errors.IncorrectObjectTypeException
* the object is not a treeish.
- * @throws MissingObjectException
+ * @throws org.eclipse.jgit.errors.MissingObjectException
* the object does not exist.
- * @throws IOException
+ * @throws java.io.IOException
* the object could not be read.
*/
public void setBase(final AnyObjectId id) throws MissingObjectException,
}
}
+ /** {@inheritDoc} */
@Override
public boolean merge(final AnyObjectId... tips) throws IOException {
if (tips.length != 2)
return super.merge(tips);
}
+ /** {@inheritDoc} */
@Override
public ObjectId getBaseCommitId() {
return baseCommitId;
*
* @return an iterator over the caller-specified merge base, or the natural
* merge base of the two input commits.
- * @throws IOException
+ * @throws java.io.IOException
*/
protected AbstractTreeIterator mergeBase() throws IOException {
if (baseTree != null)