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

.git folder is not always excluded when Use .gitignore is checked #1076

Closed
yyjdelete opened this issue Mar 12, 2024 · 2 comments
Closed

.git folder is not always excluded when Use .gitignore is checked #1076

yyjdelete opened this issue Mar 12, 2024 · 2 comments
Labels

Comments

@yyjdelete
Copy link

yyjdelete commented Mar 12, 2024

Tested with 4.1.27.0 and master(e2713e0)

Debug show if gitignore.IsEmpty, it will call EnumerateAllFiles instead of EnumerateFilesWithFilters, which do not excluded .git folder

bool simpleSearch = filter.IncludeHidden && filter.MaxSubfolderDepth == -1 &&
(excludePatterns == null || excludePatterns.Count == 0) &&
(gitignore == null || gitignore.IsEmpty) &&
string.IsNullOrWhiteSpace(filter.NamePatternToExclude);
if (simpleSearch)
return EnumerateAllFiles(path, patterns, filter.IncludeArchive, filter.IncludeSubfolders, filter.FollowSymlinks, pauseCancelToken);
else
return EnumerateFilesWithFilters(path, patterns, excludePatterns, gitignore, filter, pauseCancelToken);

@doug24 doug24 added the bug label Mar 12, 2024
@doug24
Copy link
Contributor

doug24 commented Mar 12, 2024

Thanks, I will take a look.

doug24 added a commit to doug24/dnGrep that referenced this issue Mar 15, 2024
…ries to ignore and .gitignore to the set of files to ignore
doug24 added a commit that referenced this issue Mar 15, 2024
@doug24
Copy link
Contributor

doug24 commented Apr 9, 2024

Fixed in 4.1.92

@doug24 doug24 closed this as completed May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants