mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-03 20:15:52 +01:00
fix source brower for git repository without HEAD ref
This commit is contained in:
@@ -191,7 +191,16 @@ public class GitRepositoryBrowser implements RepositoryBrowser
|
||||
|
||||
try
|
||||
{
|
||||
ObjectId revId = GitUtil.getRevisionId(repo, revision);
|
||||
ObjectId revId = null;
|
||||
|
||||
if (Util.isEmpty(revision))
|
||||
{
|
||||
revId = GitUtil.getRepositoryHead(repo);
|
||||
}
|
||||
else
|
||||
{
|
||||
revId = GitUtil.getRevisionId(repo, revision);
|
||||
}
|
||||
|
||||
if (revId != null)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user