Skip to content

Commit 01c5d07

Browse files
authored
Merge pull request #95 from ViscousPot/fix/null-head-parsing-recent-commits
fix/null head parsing recent commits
2 parents ad0980e + 6783a01 commit 01c5d07

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/src/main/java/com/viscouspot/gitsync/util/GitManager.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,7 @@ class GitManager(private val context: Context, private val settingsManager: Sett
444444
val repo = FileRepository("$gitDirPath/${context.getString(R.string.git_path)}")
445445
val revWalk = RevWalk(repo)
446446

447-
val localHead = repo.resolve(Constants.HEAD)
447+
val localHead = repo.resolve(Constants.HEAD) ?: return listOf()
448448
revWalk.markStart(revWalk.parseCommit(localHead))
449449
log(LogType.RecentCommits, "HEAD parsed")
450450

0 commit comments

Comments
 (0)