From a9b0112279bca0f19a2d8756d2fa4498936660dd Mon Sep 17 00:00:00 2001 From: Harsh Shandilya Date: Mon, 27 Nov 2023 11:34:12 +0530 Subject: fix(deps): upgrade to JGit 4.5.7.201904151645-r Currently requires deleting and re-cloning the repository to properly detect symlink support, this will be fixed in the future to auto-detect on existing repositories as well. Fixes #2594 Fixes #2396 Fixes #636 Fixes #387 Fixes #98 --- app/src/main/java/app/passwordstore/data/repo/PasswordRepository.kt | 2 +- app/src/main/java/app/passwordstore/ui/git/config/GitConfigActivity.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'app/src/main') diff --git a/app/src/main/java/app/passwordstore/data/repo/PasswordRepository.kt b/app/src/main/java/app/passwordstore/data/repo/PasswordRepository.kt index 454054cf..39c6b384 100644 --- a/app/src/main/java/app/passwordstore/data/repo/PasswordRepository.kt +++ b/app/src/main/java/app/passwordstore/data/repo/PasswordRepository.kt @@ -133,7 +133,7 @@ object PasswordRepository { /** Get the currently checked out branch. */ fun getCurrentBranch(): String? { val repository = repository ?: return null - val headRef = repository.getRef(Constants.HEAD) ?: return null + val headRef = repository.findRef(Constants.HEAD) ?: return null return if (headRef.isSymbolic) { val branchName = headRef.target.name Repository.shortenRefName(branchName) diff --git a/app/src/main/java/app/passwordstore/ui/git/config/GitConfigActivity.kt b/app/src/main/java/app/passwordstore/ui/git/config/GitConfigActivity.kt index 1411389f..d7584e69 100644 --- a/app/src/main/java/app/passwordstore/ui/git/config/GitConfigActivity.kt +++ b/app/src/main/java/app/passwordstore/ui/git/config/GitConfigActivity.kt @@ -158,7 +158,7 @@ class GitConfigActivity : BaseGitActivity() { */ private fun headStatusMsg(repo: Repository): String { return runCatching { - val headRef = repo.getRef(Constants.HEAD) + val headRef = repo.findRef(Constants.HEAD) if (headRef.isSymbolic) { val branchName = headRef.target.name val shortBranchName = Repository.shortenRefName(branchName) -- cgit v1.2.3