mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-06 13:35:44 +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 {
|
||||
clone.checkout().setName(target).call();
|
||||
ObjectId targetRevision = resolveRevision(target);
|
||||
clone.checkout().setName(targetRevision.getName()).call();
|
||||
} catch (RefNotFoundException e) {
|
||||
logger.debug("could not checkout target branch {} for merge", target, e);
|
||||
throw notFound(entity("revision", target).in(context.getRepository()));
|
||||
|
||||
Reference in New Issue
Block a user