mirror of
https://github.com/ckaczor/vscode-gitlens.git
synced 2026-01-24 17:24:53 -05:00
Fixes issues with paths on Windows
This commit is contained in:
@@ -132,7 +132,7 @@ export class GitBlameParser {
|
||||
|
||||
if (i === 0) {
|
||||
// Try to get the repoPath from the most recent commit
|
||||
repoPath = fileName.replace(`/${entry.fileName}`, '');
|
||||
repoPath = Git.normalizePath(fileName.replace(`/${entry.fileName}`, ''));
|
||||
relativeFileName = path.relative(repoPath, fileName).replace(/\\/g, '/');
|
||||
}
|
||||
|
||||
|
||||
@@ -188,7 +188,7 @@ export class GitLogParser {
|
||||
let recentCommit: GitLogCommit;
|
||||
|
||||
if (isRepoPath) {
|
||||
repoPath = fileNameOrRepoPath;
|
||||
repoPath = Git.normalizePath(fileNameOrRepoPath);
|
||||
}
|
||||
|
||||
for (let i = 0, len = entries.length; i < len; i++) {
|
||||
@@ -203,7 +203,7 @@ export class GitLogParser {
|
||||
}
|
||||
else {
|
||||
// Try to get the repoPath from the most recent commit
|
||||
repoPath = fileNameOrRepoPath.replace(fileNameOrRepoPath.startsWith('/') ? `/${entry.fileName}` : entry.fileName, '');
|
||||
repoPath = Git.normalizePath(fileNameOrRepoPath.replace(fileNameOrRepoPath.startsWith('/') ? `/${entry.fileName}` : entry.fileName, ''));
|
||||
relativeFileName = path.relative(repoPath, fileNameOrRepoPath).replace(/\\/g, '/');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
'use strict';
|
||||
import { GitStatusFileStatus, GitStatusFile, IGitStatus } from './../git';
|
||||
import { Git, GitStatusFileStatus, GitStatusFile, IGitStatus } from './../git';
|
||||
|
||||
interface IFileStatusEntry {
|
||||
staged: boolean;
|
||||
@@ -17,7 +17,7 @@ export class GitStatusParser {
|
||||
if (!lines.length) return undefined;
|
||||
|
||||
const status = {
|
||||
repoPath: repoPath,
|
||||
repoPath: Git.normalizePath(repoPath),
|
||||
state: {
|
||||
ahead: 0,
|
||||
behind: 0
|
||||
|
||||
Reference in New Issue
Block a user