File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
main/java/pl/allegro/tech/build/axion/release/infrastructure/git
test/groovy/pl/allegro/tech/build/axion/release/infrastructure/git Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -387,7 +387,7 @@ private String branchNameFromGit() {
387387 .map (Repository ::shortenRefName )
388388 .orElse (null );
389389
390- if ("HEAD" . equals ( branchName ) && properties .getOverriddenBranchName () != null && !properties .getOverriddenBranchName ().isEmpty ()) {
390+ if (properties .getOverriddenBranchName () != null && !properties .getOverriddenBranchName ().isEmpty ()) {
391391 branchName = Repository .shortenRefName (properties .getOverriddenBranchName ());
392392 }
393393 return branchName ;
Original file line number Diff line number Diff line change @@ -367,7 +367,7 @@ class GitRepositoryTest extends Specification {
367367 position. branch == ' feature/overridden-branch-name'
368368 }
369369
370- def " should ignore overriddenBranchName when not in detached state" () {
370+ def " should not ignore overriddenBranchName when not in detached state" () {
371371 given :
372372 File repositoryDir = File . createTempDir(' axion-release' , ' tmp' )
373373 def scmProperties = scmProperties(repositoryDir)
@@ -384,7 +384,7 @@ class GitRepositoryTest extends Specification {
384384 ScmPosition position = repository. currentPosition()
385385
386386 then :
387- position. branch == ' some -branch'
387+ position. branch == ' feature/overridden -branch-name '
388388 }
389389
390390 def " should push changes and tag to remote" () {
You can’t perform that action at this time.
0 commit comments