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

feat: ignore .git/ by default #1396

Merged
merged 3 commits into from
Oct 21, 2023

Conversation

skoriop
Copy link
Contributor

@skoriop skoriop commented Oct 15, 2023

Closes #1387 (breaking change!)

.git/ is now ignored by default even with --hidden / -H.

Use --no-ignore / -I or --no-ignore-vcs to override.

Copy link
Collaborator

@tmccombs tmccombs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am in favor of including this change.

I left one small bit of feedback.

src/walk.rs Outdated Show resolved Hide resolved
@skoriop skoriop requested a review from tmccombs October 18, 2023 07:33
Co-authored-by: Thayne McCombs <astrothayne@gmail.com>
@tmccombs tmccombs merged commit 3ed4ea7 into sharkdp:master Oct 21, 2023
15 checks passed
@sharkdp
Copy link
Owner

sharkdp commented Oct 21, 2023

Thank you for making this change. I'm also in favor of it. But I do think that this needs a bit of documentation and testing. I would suggest we adapt the --help texts for --hidden to reflect these changes. Otherwise, I think this can be very surprising.

As for the tests, I think we should at least add three simple checks that would assert that:

  • results in .git are not included when using --hidden
  • results in .git are not included when using --no-ignore
  • results in .git are included when using --hidden --no-ignore

At least that is my understanding how this feature should work?

@skoriop
Copy link
Contributor Author

skoriop commented Oct 21, 2023

Yup, that is how it should work.

@tmccombs
Copy link
Collaborator

I'll write some tests and docs.

tmccombs added a commit to tmccombs/fd that referenced this pull request Apr 28, 2024
tmccombs added a commit to tmccombs/fd that referenced this pull request Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Include .git/ folder in the "gitignored" filtering
3 participants