[go: up one dir, main page]

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

Replace ignore glob paths with gitignore mechanics #591

Open
GlassGruber opened this issue Sep 1, 2020 · 1 comment
Open

Replace ignore glob paths with gitignore mechanics #591

GlassGruber opened this issue Sep 1, 2020 · 1 comment
Labels
enhancement New feature or improvement

Comments

@GlassGruber
Copy link
GlassGruber commented Sep 1, 2020

Enhancement

Hey there, first of all thank you all for your work in this project.

Skimming your code in filter_ignore_files() I wondered if instead of grepping you could use git to list files that would be ignored using .git-ftp-ignore .

Consider the following command, this prints out all the files that git would ignore following the rules in .git-ftp-ignore

git ls-files --ignored --cached --exclude-from='.git-ftp-ignore'

I'm not a bash expert, nor git to be honest, but wouldn't it be more convenient to use git to do the ignore path logics and just filter out duplicates with the full list of files with something like uniq?

Just throwing ideas around, I'm really not an expert in bashisms and the like.
I got a bit baffled that my .git-ftp-ignore was ineffective until I RTM and found glob paths are used. Also not able to revert negated paths is quite inconvenient!

Thank you for your time, if the above it's not clear or if I can help with something let me know!


Updated with --cached to comply with git/git@b338e9f.

@LukasFritzeDev LukasFritzeDev added the enhancement New feature or improvement label Sep 5, 2020
@LukasFritzeDev
Copy link
Collaborator

HeyHo, thanks for this suggestion.

It sounds 100& logically to me and I wonder why we didn’t thought about this. I’ll do some testing on this topic as soon as I get some some free time.

Thanks again :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or improvement
Projects
None yet
Development

No branches or pull requests

2 participants