libgit2/libgit2 — pull request #1084 by scottjg (2012-11-19 01:03:36+00:00)
Title: Filename validation

Add some sanity checks for filenames being added to a tree. Attempts to tackle some of the issues we saw in github/github/#7292

The main filenames we want to avoid are `.`, `..`, and `.git`

I kind of wish we had some checks in the index api itself to prevent adding these files at all to the index... but it would be a lot of duplicated code to deconstruct the path elements and check each one yet again. thoughts?