Skip to content

Commit 723e5e0

Browse files
committed
Fixes getWorkingUri if ls-files returns >1 result
1 parent ad99373 commit 723e5e0

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
1010

1111
- Changes the experimental _Incoming Activity_ node in the _Repositories_ view to be available for everyone (not just if `"gitlens.insiders": true`)
1212

13+
### Fixed
14+
15+
- Fixes issue with locating a working file when the file is staged or modified
16+
1317
## [10.0.0]- 2019-09-20
1418

1519
### Added

src/git/gitService.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2568,7 +2568,7 @@ export class GitService implements Disposable {
25682568
do {
25692569
data = await Git.ls_files(repoPath, fileName);
25702570
if (data !== undefined) {
2571-
return GitUri.resolveToUri(data, repoPath);
2571+
return GitUri.resolveToUri(Strings.splitSingle(data, '\n')[0], repoPath);
25722572
}
25732573

25742574
// TODO: Add caching

0 commit comments

Comments
 (0)