boolean ok = ixMerger.merge(headCommit, stashIndexCommit);
if (ok) {
resetIndex(revWalk
.parseTree(ixMerger.getResultTreeId()));
} else {
throw new StashApplyFailureException(
JGitText.get().stashApplyConflict);
}
}
if (untrackedCommit != null) {
ResolveMerger untrackedMerger = (ResolveMerger) strategy
.newMerger(repo, true);
untrackedMerger.setCommitNames(new String[] {
"stashed HEAD", "HEAD", "untracked files" }); //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
untrackedMerger.setBase(stashHeadCommit);
boolean ok = untrackedMerger.merge(headCommit,
untrackedCommit);
if (ok)
try {
RevTree untrackedTree = revWalk
.parseTree(untrackedMerger
.getResultTreeId());
resetUntracked(untrackedTree);
} catch (CheckoutConflictException e) {
throw new StashApplyFailureException(
JGitText.get().stashApplyConflict);
}
else
throw new StashApplyFailureException(
JGitText.get().stashApplyConflict);
}
} else {
throw new StashApplyFailureException(
JGitText.get().stashApplyConflict);
}
return stashId;
} catch (JGitInternalException e) {