pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/git-ftp/git-ftp/pull/636

ad7b2.css" /> Replace grep in `filter_ignore_files()` with `git ls-files --ignored` by GlassGruber · Pull Request #636 · git-ftp/git-ftp · GitHub
Skip to content

Replace grep in filter_ignore_files() with git ls-files --ignored#636

Open
GlassGruber wants to merge 2 commits into
git-ftp:masterfrom
GlassGruber:patch-1
Open

Replace grep in filter_ignore_files() with git ls-files --ignored#636
GlassGruber wants to merge 2 commits into
git-ftp:masterfrom
GlassGruber:patch-1

Conversation

@GlassGruber
Copy link
Copy Markdown

This is a follow up of #591

Copy link
Copy Markdown
Member

@mkllnk mkllnk left a comment

Choose a reason for hiding this comment

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

Thank you for this contribution. I didn't know about this option and it definitely seems to be the way to go. But I also think that we can now simplify this method a lot. The output of ls-files is a list of file names, not patterns. So we can use that list with easy comparison instead of using glob patterns. Unfortunately, I don't have time to do this myself. Would you like to get more into bash coding?

@GlassGruber
Copy link
Copy Markdown
Author

Hei there, yea I'm glad to contribute and hopefully I'll not break anything!

Took me a bit to grok the slice and dice in the filtering functions with the NUL separator bit, but eventually I remembered I did something similar before with rip-grep and adapted to grep.

My coding can be a bit verbose with comments and airy with spaces so if you prefer more terseness please edit as you like.

With a couple of very simple tests everything looks like working as expected.
I don't know the potential performance implications of grep in the filtering, I guess nothing really concerning, maybe in case of a very huge commit or similar? Anyway I haven't noticed anything slower in my few tests.

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.

2 participants

pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy