mirror of
https://github.com/ckaczor/vscode-gitlens.git
synced 2026-02-16 18:48:45 -05:00
Changes commit type repo to branch
This commit is contained in:
@@ -46,7 +46,7 @@ export class ShowQuickCommitDetailsCommand extends ActiveEditorCachedCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (!commit || (commit.type !== 'repo' && commit.type !== 'stash')) {
|
if (!commit || (commit.type !== 'branch' && commit.type !== 'stash')) {
|
||||||
if (repoLog) {
|
if (repoLog) {
|
||||||
commit = repoLog.commits.get(sha);
|
commit = repoLog.commits.get(sha);
|
||||||
// If we can't find the commit, kill the repoLog
|
// If we can't find the commit, kill the repoLog
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ export interface IGitCommitLine {
|
|||||||
code?: string;
|
code?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export type GitCommitType = 'blame' | 'file' | 'repo' | 'stash';
|
export type GitCommitType = 'blame' | 'branch' | 'file' | 'stash';
|
||||||
|
|
||||||
export class GitCommit implements IGitCommit {
|
export class GitCommit implements IGitCommit {
|
||||||
|
|
||||||
|
|||||||
@@ -96,7 +96,7 @@ export class GitLogParser {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 'filename':
|
case 'filename':
|
||||||
if (type === 'repo') {
|
if (type === 'branch') {
|
||||||
const nextLine = lines[position + 1];
|
const nextLine = lines[position + 1];
|
||||||
// If the next line isn't blank, make sure it isn't starting a new commit
|
// If the next line isn't blank, make sure it isn't starting a new commit
|
||||||
if (nextLine && Git.shaRegex.test(nextLine)) continue;
|
if (nextLine && Git.shaRegex.test(nextLine)) continue;
|
||||||
|
|||||||
@@ -541,7 +541,7 @@ export class GitService extends Disposable {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
const data = await Git.log(repoPath, sha, maxCount, reverse);
|
const data = await Git.log(repoPath, sha, maxCount, reverse);
|
||||||
return GitLogParser.parse(data, 'repo', repoPath, undefined, sha, maxCount, reverse, undefined);
|
return GitLogParser.parse(data, 'branch', repoPath, undefined, sha, maxCount, reverse, undefined);
|
||||||
}
|
}
|
||||||
catch (ex) {
|
catch (ex) {
|
||||||
return undefined;
|
return undefined;
|
||||||
|
|||||||
Reference in New Issue
Block a user