mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-05 21:15:49 +01:00
Fix getAllcommitIds bug in empty repository
This commit is contained in:
@@ -573,7 +573,9 @@ object JGitUtil {
|
||||
/**
|
||||
* Returns all commit id in the specified repository.
|
||||
*/
|
||||
def getAllCommitIds(git: Git): Seq[String] = {
|
||||
def getAllCommitIds(git: Git): Seq[String] = if(isEmpty(git)) {
|
||||
Nil
|
||||
} else {
|
||||
val existIds = new scala.collection.mutable.ListBuffer[String]()
|
||||
val i = git.log.all.call.iterator
|
||||
while(i.hasNext){
|
||||
|
||||
Reference in New Issue
Block a user