File tree Expand file tree Collapse file tree 1 file changed +10
-14
lines changed
src/main/java/org/scm4j/vcs Expand file tree Collapse file tree 1 file changed +10
-14
lines changed Original file line number Diff line number Diff line change @@ -153,22 +153,18 @@ public void deleteBranch(String branchName, String commitMessage) {
153
153
try (IVCSLockedWorkingCopy wc = repo .getVCSLockedWorkingCopy ();
154
154
Git git = getLocalGit (wc );
155
155
Repository gitRepo = git .getRepository ()) {
156
- //try {
157
156
158
- checkout (git , gitRepo , MASTER_BRANCH_NAME );
157
+ checkout (git , gitRepo , MASTER_BRANCH_NAME );
159
158
160
- git
161
- .branchDelete ()
162
- .setBranchNames (branchName )
163
- .setForce (true ) // avoid "not merged" exception
164
- .call ();
165
-
166
- RefSpec refSpec = new RefSpec ( ":refs/heads/" + branchName );
167
-
168
- push (git , refSpec );
169
- // } finally {
170
- // git.getRepository().close();
171
- // }
159
+ git
160
+ .branchDelete ()
161
+ .setBranchNames (branchName )
162
+ .setForce (true ) // avoid "not merged" exception
163
+ .call ();
164
+
165
+ RefSpec refSpec = new RefSpec ( ":refs/heads/" + branchName );
166
+
167
+ push (git , refSpec );
172
168
} catch (GitAPIException e ) {
173
169
throw new EVCSException (e );
174
170
} catch (Exception e ) {
You can’t perform that action at this time.
0 commit comments