Skip to content

Commit c1c8c75

Browse files
committed
Fixes regression causing copy message to clipboard to fail
1 parent 7814d5e commit c1c8c75

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
44

55
The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/).
66

7+
## [Unreleased]
8+
9+
### Fixed
10+
11+
- Fixes an issue where the _Copy Commit Message to Clipboard_ command fails (and probably others too) — a regression caused by the attempted fix for [#568](https://github.com/eamodio/vscode-gitlens/issues/565)
12+
713
## [9.0.2] - 2018-12-05
814

915
### Added

src/git/gitUri.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,8 +328,9 @@ export class GitUri extends ((Uri as any) as UriEx) {
328328
if (repoPath === undefined) return normalizedFileName;
329329

330330
const normalizedRepoPath = Strings.normalizePath(repoPath);
331+
if (normalizedFileName == null || normalizedFileName.length === 0) return normalizedRepoPath;
331332

332-
if (!normalizedFileName || normalizedFileName.startsWith(normalizedRepoPath)) return normalizedFileName;
333+
if (normalizedFileName.startsWith(normalizedRepoPath)) return normalizedFileName;
333334
return Strings.normalizePath(paths.join(normalizedRepoPath, normalizedFileName));
334335
}
335336

0 commit comments

Comments
 (0)