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

add --gitignore option to not sync gitignored files #502

Closed
wants to merge 1 commit into from

Conversation

apoelstra
Copy link

No description provided.

@apoelstra
Copy link
Author

apoelstra commented Dec 26, 2020

I know the dev docs say to open an issue for discussion before adding stuff, but this was very quick to do and solved a problem I was having (how to ignore build artifacts etc from git repositories that I've got all over my home directory). I'm happy to clean this up or make other changes, although I can't test on Windows or OS X.

Feel free to close if this isn't something the project is interested in.

@apoelstra apoelstra force-pushed the 2020-12--gitignore branch 3 times, most recently from 5aa056f to 67a9995 Compare December 26, 2020 03:59
@ericzolf
Copy link
Member

I haven't done a full review yet of the code but I'm already struggling with this PR:

  1. the git library doesn't work properly under Windows according to Fix "known" Windows errored test cases gitpython-developers/GitPython#525 and rdiff-backup must remain cross-platform
  2. it also leaks memory and can crash, which isn't something we want in a backup tool.
  3. it is very specific in the sense that we could also add "intelligence" for Mercury, or any other special software. That doesn't seem to scale to me, until we have some kind of plug-in concept.
  4. it's perhaps me, but if you don't want to back-up your gitignored files, and don't need to back-up the non-gitignored files (because it's Git, and already backed-up so to say), just ignore the whole Git repo. So what would be the use case for this PR?

@apoelstra
Copy link
Author

I have no access to Windows machines, nor do I know how to deal with memory leaks in Python. So I think this PR is dead on arrival.

I don't understand your suggestion to ignore the entire repo :). git repos are not "already backed-up".

In any case, even for my personal usage I've moved away from this and instead just added the same flag to rsync using libgit2, which is 1000x faster than this approach, and has a much clearer memory model and more of a hope of being cross-platform.

Thanks for taking a look, and sorry to waste your time.

@apoelstra apoelstra closed this Dec 29, 2020
@apoelstra apoelstra deleted the 2020-12--gitignore branch December 29, 2020 19:19
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