mirror of
https://github.com/ckaczor/vscode-gitlens.git
synced 2026-01-15 01:25:42 -05:00
Adds compare with branch command
Adds branches quick pick
This commit is contained in:
@@ -4,7 +4,7 @@ import { Disposable, Event, EventEmitter, ExtensionContext, FileSystemWatcher, l
|
||||
import { CommandContext, setCommandContext } from './commands';
|
||||
import { CodeLensVisibility, IConfig } from './configuration';
|
||||
import { DocumentSchemes, WorkspaceState } from './constants';
|
||||
import { Git, GitBlameParserEnricher, GitBlameFormat, GitCommit, GitFileStatusItem, GitLogParserEnricher, IGitAuthor, IGitBlame, IGitBlameLine, IGitBlameLines, IGitLog } from './git/git';
|
||||
import { Git, GitBlameParserEnricher, GitBlameFormat, GitBranch, GitCommit, GitFileStatusItem, GitLogParserEnricher, IGitAuthor, IGitBlame, IGitBlameLine, IGitBlameLines, IGitLog } from './git/git';
|
||||
import { IGitUriData, GitUri } from './git/gitUri';
|
||||
import GitCodeLensProvider from './gitCodeLensProvider';
|
||||
import { Logger } from './logger';
|
||||
@@ -491,6 +491,14 @@ export class GitService extends Disposable {
|
||||
return locations;
|
||||
}
|
||||
|
||||
async getBranches(repoPath: string): Promise<GitBranch[]> {
|
||||
Logger.log(`getBranches('${repoPath}')`);
|
||||
|
||||
const data = await Git.branch(repoPath);
|
||||
const branches = data.split('\n').filter(_ => !!_).map(_ => new GitBranch(_));
|
||||
return branches;
|
||||
}
|
||||
|
||||
async getLogForRepo(repoPath: string, sha?: string, maxCount?: number, reverse: boolean = false): Promise<IGitLog | undefined> {
|
||||
Logger.log(`getLogForRepo('${repoPath}', ${maxCount})`);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user