respect gitignore in toes status
This commit is contained in:
parent
c183fe42e9
commit
10154dfd4f
|
|
@ -158,10 +158,11 @@ export async function pushApp(options: { quiet?: boolean } = {}) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Files to delete (exist on server but not locally)
|
// Files to delete (exist on server but not locally, respecting gitignore)
|
||||||
|
const gitignore = loadGitignore(process.cwd())
|
||||||
const toDelete: string[] = []
|
const toDelete: string[] = []
|
||||||
for (const file of remoteFiles) {
|
for (const file of remoteFiles) {
|
||||||
if (!localFiles.has(file)) {
|
if (!localFiles.has(file) && !gitignore.shouldExclude(file)) {
|
||||||
toDelete.push(file)
|
toDelete.push(file)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1008,10 +1009,11 @@ async function getManifestDiff(appName: string): Promise<ManifestDiff | null> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Files only in remote
|
// Files only in remote (filtered by local gitignore)
|
||||||
|
const gitignore = loadGitignore(process.cwd())
|
||||||
const remoteOnly: string[] = []
|
const remoteOnly: string[] = []
|
||||||
for (const file of remoteFiles) {
|
for (const file of remoteFiles) {
|
||||||
if (!localFiles.has(file)) {
|
if (!localFiles.has(file) && !gitignore.shouldExclude(file)) {
|
||||||
remoteOnly.push(file)
|
remoteOnly.push(file)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user