Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions dist/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -12830,8 +12830,9 @@ function parseGitDiff(diffOutput) {
}
return files;
}
function getGitDiff(repoDir, base = GIT.DEFAULT_BASE_REF) {
const output = execSync(`git diff ${base}...HEAD -- . ':(exclude)${AUTODOCS_DIR}'`, {
function getGitDiff(repoDir, base = GIT.DEFAULT_BASE_REF, extraExcludes = []) {
const excludes = [AUTODOCS_DIR, ...extraExcludes].map((p) => `':(exclude)${p}'`).join(" ");
const output = execSync(`git diff ${base}...HEAD -- . ${excludes}`, {
cwd: repoDir,
encoding: UTF8,
maxBuffer: MAX_DIFF_BYTES
Expand Down
5 changes: 3 additions & 2 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5458,8 +5458,9 @@ function parseGitDiff(diffOutput) {
}
return files;
}
function getGitDiff(repoDir, base = GIT.DEFAULT_BASE_REF) {
const output = execSync(`git diff ${base}...HEAD -- . ':(exclude)${AUTODOCS_DIR}'`, {
function getGitDiff(repoDir, base = GIT.DEFAULT_BASE_REF, extraExcludes = []) {
const excludes = [AUTODOCS_DIR, ...extraExcludes].map((p) => `':(exclude)${p}'`).join(" ");
const output = execSync(`git diff ${base}...HEAD -- . ${excludes}`, {
cwd: repoDir,
encoding: UTF8,
maxBuffer: MAX_DIFF_BYTES
Expand Down
12 changes: 9 additions & 3 deletions src/differ/git-differ.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,15 @@
return files
}

export function getGitDiff(repoDir: string, base = GIT.DEFAULT_BASE_REF): ChangedFile[] {
// Exclude the generated index dir so its churn never triggers doc updates.
const output = execSync(`git diff ${base}...HEAD -- . ':(exclude)${AUTODOCS_DIR}'`, {
export function getGitDiff(
repoDir: string,
base = GIT.DEFAULT_BASE_REF,
extraExcludes: string[] = [],
): ChangedFile[] {
const excludes = [AUTODOCS_DIR, ...extraExcludes]
.map(p => `':(exclude)${p}'`)
.join(' ')
const output = execSync(`git diff ${base}...HEAD -- . ${excludes}`, {
Comment thread
github-advanced-security[bot] marked this conversation as resolved.
Fixed
cwd: repoDir,
encoding: UTF8,
maxBuffer: MAX_DIFF_BYTES,
Expand Down
Loading