mirror of
https://forgejo.mixinet.net/actions/checkout.git
synced 2025-06-15 14:50:45 -06:00
Exclude path from clean
This commit is contained in:
parent
85e6279cec
commit
9a73efb9ba
6 changed files with 28 additions and 5 deletions
|
@ -57,7 +57,7 @@ export interface IGitCommandManager {
|
|||
submoduleUpdate(fetchDepth: number, recursive: boolean): Promise<void>
|
||||
submoduleStatus(): Promise<boolean>
|
||||
tagExists(pattern: string): Promise<boolean>
|
||||
tryClean(): Promise<boolean>
|
||||
tryClean(exclude_from_clean: string | undefined): Promise<boolean>
|
||||
tryConfigUnset(configKey: string, globalConfig?: boolean): Promise<boolean>
|
||||
tryDisableAutomaticGarbageCollection(): Promise<boolean>
|
||||
tryGetFetchUrl(): Promise<string>
|
||||
|
@ -434,8 +434,13 @@ class GitCommandManager {
|
|||
return !!output.stdout.trim()
|
||||
}
|
||||
|
||||
async tryClean(): Promise<boolean> {
|
||||
const output = await this.execGit(['clean', '-ffdx'], true)
|
||||
async tryClean(exclude_from_clean: string | undefined): Promise<boolean> {
|
||||
let output
|
||||
if (exclude_from_clean === undefined) {
|
||||
output = await this.execGit(['clean', '-ffdx'], true)
|
||||
} else {
|
||||
output = await this.execGit(['clean', '-ffdx', '-e', exclude_from_clean], true)
|
||||
}
|
||||
return output.exitCode === 0
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue