earwig / bitshift

A semantic search engine for source code
https://bitshift.benkurtovic.com/
MIT License
30 stars 5 forks source link

Actually remove the full directory tree from /tmp/bitshift #33

Closed earwig closed 10 years ago

earwig commented 10 years ago

Remove the full directory tree when you clone a repo, @sevko. Currently, after cloning foo/bar, we're left with /tmp/bitshift/foo.

sevko commented 10 years ago

This is partly intentional. indexer.GitIndexer and indexer._GitCloner are threaded and work asynchronously, meaning that the _GitCloner might clone several repositories before the GitIndexer manages to index one of them; if any repositories belonged to the same author, they'd all be removed after only one was indexed, which would cause problems later on. Anyway, adding a conditional to remove the full path only after one directory remains.

earwig commented 10 years ago

The main concern is that we could be left with a /tmp/bitshift full of a thousand empty directories (not good).