Skip to content

Commit cc05595

Browse files
committed
Fixes #313 - disambiguates ref vs file
1 parent 911db7c commit cc05595

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ 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+
### Fixed
9+
- Fixes [#313](https://github.com/eamodio/vscode-gitlens/issues/313) - Unable to show branch history for branch that matches file or folder name
10+
711
## [8.2.2] - 2018-04-19
812
### Added
913
- Adds an indicator to the *GitLens* explorer's branch history to mark the the tips of all branches

src/git/git.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,7 @@ export class Git {
413413
params.push(options.ref);
414414
}
415415
}
416-
return gitCommand({ cwd: repoPath }, ...params);
416+
return gitCommand({ cwd: repoPath }, ...params, '--');
417417
}
418418

419419
static log_file(repoPath: string, fileName: string, options: { maxCount?: number, ref?: string, renames?: boolean, reverse?: boolean, startLine?: number, endLine?: number } = { renames: true, reverse: false }) {
@@ -441,9 +441,7 @@ export class Git {
441441
params.push(`-L ${options.startLine},${options.endLine}:${file}`);
442442
}
443443

444-
params.push('--', file);
445-
446-
return gitCommand({ cwd: root }, ...params);
444+
return gitCommand({ cwd: root }, ...params, '--', file);
447445
}
448446

449447
static async log_recent(repoPath: string, fileName: string) {
@@ -480,7 +478,7 @@ export class Git {
480478
if (options.ref && !Git.isStagedUncommitted(options.ref)) {
481479
params.push(options.ref);
482480
}
483-
return gitCommand({ cwd: repoPath }, ...params);
481+
return gitCommand({ cwd: repoPath }, ...params, '--');
484482
}
485483

486484
static async ls_files(repoPath: string, fileName: string, options: { ref?: string } = {}): Promise<string> {

0 commit comments

Comments
 (0)