Skip to content

Commit

Permalink
feat(git): ✨ added support for .ultraignore (#168)
Browse files Browse the repository at this point in the history
* fix(git): πŸ› .gitignore considered in getGitFiles

* Update git.ts
  • Loading branch information
lxgreen authored Feb 26, 2021
1 parent 9b04b0b commit fab9da1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/git.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,12 @@ export function parseFiles(data: string, root: string): GitFiles {

export async function getGitFiles(root: string): Promise<GitFiles> {
return new Promise((resolve, reject) => {
const ultraIgnoreExists = fs.existsSync(path.resolve(root, ".ultraignore"))
const lsFiles = `git ls-files --full-name -s -d -c -m -o ${
ultraIgnoreExists ? "-X .ultraignore" : ""
} --directory -t`
exec(
"git ls-files --full-name -s -d -c -m -o --directory -t",
lsFiles,
{ cwd: root, maxBuffer: 1024 * 1024 * 1024 },
(error, stdout) => {
if (error) return reject(error)
Expand Down

0 comments on commit fab9da1

Please sign in to comment.