Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skip .git folders in file listings #83

Merged
merged 1 commit into from
Sep 3, 2021
Merged

Skip .git folders in file listings #83

merged 1 commit into from
Sep 3, 2021

Conversation

dmikusa
Copy link
Contributor

@dmikusa dmikusa commented Sep 3, 2021

Summary

The file listing mechanism will traverse all directories given to it & return a listing of all files. The main purpose of this mechanism is to detect changes under a directory structure. This change will skip .git folders as the file listing is traversing subdirectories. This is because .git folders are well-know, can change independent of the application (like if you change git config) but shouldn't trigger rebuilds of the application. In additiona, the .git directory can for larger projects contain a large number of files, so skipping it can help with performance on large projects.

This change will skip all folders with the name .git, not just the top-level .git folder.

This resolves #55.

Use Cases

Improve performance and accuracy of file change detection.

Checklist

  • I have viewed, signed, and submitted the Contributor License Agreement.
  • I have linked issue(s) that this PR should close using keywords or the Github UI (See docs)
  • I have added an integration test, if necessary.
  • I have reviewed the styleguide for guidance on my code quality.
  • I'm happy with the commit history on this PR (I have rebased/squashed as needed).

The file listing mechanism will traverse all directories given to it & return a listing of all files. The main purpose of this mechanism is to detect changes under a directory structure. This change will skip `.git` folders as the file listing is traversing subdirectories. This is because `.git` folders are well-know, can change independent of the application (like if you change git config) but shouldn't trigger rebuilds of the application. In additiona, the `.git` directory can for larger projects contain a large number of files, so skipping it can help with performance on large projects.

This change will skip all folders with the name `.git`, not just the top-level `.git` folder.

This resolves #55.

Signed-off-by: Daniel Mikusa <[email protected]>
@dmikusa dmikusa added type:enhancement A general enhancement semver:minor A change requiring a minor version bump labels Sep 3, 2021
@dmikusa dmikusa requested a review from a team September 3, 2021 14:08
@dmikusa dmikusa merged commit aa87b93 into main Sep 3, 2021
@dmikusa dmikusa deleted the skip-git branch September 3, 2021 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver:minor A change requiring a minor version bump type:enhancement A general enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve behavior of walking file system
1 participant