mirror of
https://github.com/dorny/paths-filter.git
synced 2025-06-08 00:59:04 +00:00
Remove usage of --no-auto-gc option (#42)
* Remove usage of --no-auto-gc option This option is not supported in git versions < 2.23. Older git versions might be used in self-hosted runners. * Update CHANGELOG
This commit is contained in:
parent
8b399ed168
commit
9553dabbd8
4 changed files with 9 additions and 6 deletions
|
@ -21,7 +21,7 @@ export async function getChanges(ref: string): Promise<File[]> {
|
|||
if (!(await hasCommit(ref))) {
|
||||
// Fetch single commit
|
||||
core.startGroup(`Fetching ${ref} from origin`)
|
||||
await exec('git', ['fetch', '--depth=1', '--no-tags', '--no-auto-gc', 'origin', ref])
|
||||
await exec('git', ['fetch', '--depth=1', '--no-tags', 'origin', ref])
|
||||
core.endGroup()
|
||||
}
|
||||
|
||||
|
@ -64,7 +64,7 @@ export async function getChangesSinceMergeBase(ref: string, initialFetchDepth: n
|
|||
let deepen = initialFetchDepth
|
||||
let lastCommitsCount = await countCommits()
|
||||
do {
|
||||
await exec('git', ['fetch', `--deepen=${deepen}`, '--no-tags', '--no-auto-gc'])
|
||||
await exec('git', ['fetch', `--deepen=${deepen}`, '--no-tags'])
|
||||
const count = await countCommits()
|
||||
if (count <= lastCommitsCount) {
|
||||
core.info('No merge base found - all files will be listed as added')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue