feat(file-explorer): add gitignored visibility toggle (#2022)
This commit is contained in:
@@ -35,6 +35,7 @@ import { getHistory as getGitHistory } from '../git/history'
|
||||
import { getUpstreamStatus } from '../git/upstream'
|
||||
import { gitFetch, gitPull, gitPush } from '../git/remote'
|
||||
import { getSshGitProvider } from '../providers/ssh-git-dispatch'
|
||||
import { checkIgnoredPaths } from '../git/check-ignored-paths'
|
||||
import {
|
||||
cancelGenerateCommitMessageLocal,
|
||||
cancelGeneratePullRequestFieldsLocal,
|
||||
@@ -95,6 +96,21 @@ export class RuntimeGitCommands {
|
||||
: getGitStatus(target.worktree.path)
|
||||
}
|
||||
|
||||
async checkRuntimeGitIgnoredPaths(
|
||||
worktreeSelector: string,
|
||||
relativePaths: string[]
|
||||
): Promise<string[]> {
|
||||
const target = await this.host.resolveRuntimeGitTarget(worktreeSelector)
|
||||
const provider = target.connectionId ? getSshGitProvider(target.connectionId) : null
|
||||
if (target.connectionId) {
|
||||
if (!provider) {
|
||||
throw new Error('remote_git_unavailable')
|
||||
}
|
||||
return provider.checkIgnoredPaths(target.worktree.path, relativePaths)
|
||||
}
|
||||
return checkIgnoredPaths(target.worktree.path, relativePaths)
|
||||
}
|
||||
|
||||
async getRuntimeGitHistory(
|
||||
worktreeSelector: string,
|
||||
options: GitHistoryOptions = {}
|
||||
|
||||
Reference in New Issue
Block a user