Skip to content

Commit a240816

Browse files
committed
refactor: update extension.ts
1 parent 09fab3f commit a240816

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

src/extension.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,15 @@ function _validateFoundRepos(git: API) {
3030
* Run autofill against one of multiples in the workspace or when using GitLens on a single repo.
3131
*/
3232
async function _handleRepos(git: API, sourceControl: vscode.SourceControl) {
33-
// FIXME: Unfortunately this seems to only pick up the first repo and not find
34-
// second, etc. If you repository through to makeAndFillCommitMsg, getChanges
35-
// and diffIndex etc. and replace "getWorkspaceFolder" usage then that will work.
3633
const selectedRepo = git.repositories.find(repository => {
3734
const uri = sourceControl.rootUri;
3835
if (!uri) {
3936
console.warn("rootUri not set for current repo");
4037
return false;
4138
}
42-
return repository.rootUri.path === uri.path;
39+
const repoPath = repository.rootUri.path;
40+
41+
return repoPath === uri.path;
4342
});
4443

4544
if (selectedRepo) {

0 commit comments

Comments
 (0)