mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-12-23 00:39:47 +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,
|
public static String getScmRemoteRefName(Repository repository,
|
||||||
String localBranch)
|
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