mirror of
https://github.com/ckaczor/vscode-gitlens.git
synced 2026-01-14 10:03:15 -05:00
Adds experimental 'Stash Changes' command
Adds experimental 'Stash Changes' to stash list Adds experimental 'Stash Unstaged Changes' to stash list
This commit is contained in:
@@ -250,6 +250,17 @@ export class Git {
|
||||
return gitCommand(repoPath, ...defaultStashParams);
|
||||
}
|
||||
|
||||
static stash_save(repoPath: string, message?: string, unstagedOnly: boolean = false) {
|
||||
const params = [`stash`, `save`, `--include-untracked`];
|
||||
if (unstagedOnly) {
|
||||
params.push(`--keep-index`);
|
||||
}
|
||||
if (message) {
|
||||
params.push(message);
|
||||
}
|
||||
return gitCommand(repoPath, ...params);
|
||||
}
|
||||
|
||||
static status(repoPath: string, porcelainVersion: number = 1): Promise<string> {
|
||||
const porcelain = porcelainVersion >= 2 ? `--porcelain=v${porcelainVersion}` : '--porcelain';
|
||||
return gitCommand(repoPath, 'status', porcelain, '--branch');
|
||||
|
||||
Reference in New Issue
Block a user