buzzfeed/caliendo — pull request #51 by pahko (2014-02-03 19:11:05+00:00)
Title: Automagically flag cachefiles as binary

The cachefiles generated by caliendo should be added to .gitattributes as binary so they are not displayed in diffs on github.

We'll need to locate the nearest .gitattributes, .gitignore, or .git file (in that order) from the `CALIENDO_CACHE_PREFIX` directory and append the cachefiles as they're named to .gitattributes if it exists. If it does not exist it should be created in the parent directory of .gitignore or .git. Cachefile names should be added to .gitattributes as they're added and removed as they're deleted.

This functionality should be added to the `caliendo.db.flatfiles.purge` method since the behavior is general upkeep, or a new method should be added to wrap both `purge` and the described functionality. Perhaps `upkeep` describes the nature of the task. Up to the developer.