mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-08 06:25:45 +01:00
Fix checkout of target branch
This commit is contained in:
@@ -95,9 +95,10 @@ public class GitMergeCommand extends AbstractGitCommand implements MergeCommand
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void checkOutTargetBranch() {
|
private void checkOutTargetBranch() throws IOException {
|
||||||
try {
|
try {
|
||||||
clone.checkout().setName(target).call();
|
ObjectId targetRevision = resolveRevision(target);
|
||||||
|
clone.checkout().setName(targetRevision.getName()).call();
|
||||||
} catch (RefNotFoundException e) {
|
} catch (RefNotFoundException e) {
|
||||||
logger.debug("could not checkout target branch {} for merge", target, e);
|
logger.debug("could not checkout target branch {} for merge", target, e);
|
||||||
throw notFound(entity("revision", target).in(context.getRepository()));
|
throw notFound(entity("revision", target).in(context.getRepository()));
|
||||||
|
|||||||
Reference in New Issue
Block a user