mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-03 20:15:52 +01:00
fix wrong remote ref name
This commit is contained in:
@@ -598,7 +598,12 @@ public final class GitUtil
|
||||
public static String getScmRemoteRefName(Repository repository,
|
||||
String localBranch)
|
||||
{
|
||||
return String.format(REMOTE_REF, repository.getId(), localBranch);
|
||||
String branch = localBranch;
|
||||
if ( localBranch.startsWith(REF_HEAD_PREFIX) )
|
||||
{
|
||||
branch = localBranch.substring(REF_HEAD_PREFIX.length());
|
||||
}
|
||||
return String.format(REMOTE_REF, repository.getId(), branch);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user