mirror of
https://github.com/ckaczor/vscode-gitlens.git
synced 2026-01-14 17:25:28 -05:00
Adds search commits command
Search by message, author, file pattern, or sha
This commit is contained in:
@@ -235,6 +235,15 @@ export class Git {
|
||||
return gitCommand(root, ...params);
|
||||
}
|
||||
|
||||
static log_search(repoPath: string, search?: string[], maxCount?: number) {
|
||||
const params = [...defaultLogParams, `-m`, `-i`];
|
||||
if (maxCount) {
|
||||
params.push(`-n${maxCount}`);
|
||||
}
|
||||
|
||||
return gitCommand(repoPath, ...params, ...search);
|
||||
}
|
||||
|
||||
static async ls_files(repoPath: string, fileName: string): Promise<string> {
|
||||
try {
|
||||
return await gitCommand(repoPath, 'ls-files', fileName);
|
||||
|
||||
Reference in New Issue
Block a user