mirror of
https://github.com/scm-manager/scm-manager.git
synced 2026-03-06 12:20:56 +01:00
fixed missing checkout call for GitBranchCommand
This commit is contained in:
@@ -61,7 +61,7 @@ public class GitBranchCommand extends AbstractGitCommand implements BranchComman
|
||||
try (WorkingCopy<org.eclipse.jgit.lib.Repository> workingCopy = workdirFactory.createWorkingCopy(context)) {
|
||||
Git clone = new Git(workingCopy.getWorkingRepository());
|
||||
if (request.getParentBranch() != null) {
|
||||
clone.checkout().setName(request.getParentBranch());
|
||||
clone.checkout().setName("origin/" + request.getParentBranch()).call();
|
||||
}
|
||||
Ref ref = clone.branchCreate().setName(request.getNewBranch()).call();
|
||||
Iterable<PushResult> call = clone.push().add(request.getNewBranch()).call();
|
||||
|
||||
Reference in New Issue
Block a user