md2cf icon indicating copy to clipboard operation
md2cf copied to clipboard

Add .gitignore support

Open bjorns opened this issue 3 years ago • 2 comments

Read .gitignore files in the repo and use them to skip ignored files from upload.

Flag --no-gitignore disables the functionality.

bjorns avatar Jul 08 '22 13:07 bjorns

Thanks for the PR! I fully support this and I think it's a great idea, but I have a few suggestions:

  • rather add the parser as a dependency rather than straight up including it. Would you mind reworking your MR to do that instead?
  • I would also like for this to be optionally turned off through a -I or --no-ignore flag from the command line
  • while I appreciate your use of logging (and it's definitely something I want to clean up in the rest of the codebase) I'd like to keep things uniform for now and limit output to simple prints.

It would be nice to also add a test or two for this :)

iamjackg avatar Jul 09 '22 01:07 iamjackg

Alright, so I've added a test and a --no-gitignore flag. I didn't add the -I flag because none of the other directory flags had a short form. Maybe that's something you want to add in a concerted way instead?

Also unit test added.

bjorns avatar Aug 06 '22 13:08 bjorns

@iamjackg pinging this again, I've made the requested upgrades. Would be super useful to have it in a release version.

bjorns avatar Aug 16 '22 15:08 bjorns

Thank you so much for working on this, I'll take a look soon.

iamjackg avatar Aug 19 '22 13:08 iamjackg