Skip to content

Instantly share code, notes, and snippets.

@galvez
Created December 24, 2009 03:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save galvez/262991 to your computer and use it in GitHub Desktop.
Save galvez/262991 to your computer and use it in GitHub Desktop.
# little monstruosity i wrote, probably done with 10x fewer characters with sed
# and maybe 5x fewer characters with ruby, but python is still my native language :)
git status | grep \.svn | python -c "import re, sys; sys.stdout.write('\n'.join(set([res[0] for res in [re.findall('file:\s+(.*?\.svn)', line) for line in sys.stdin.readlines()] if len(res) > 0])));" | python -c "import os, sys; [os.system('git rm -rf %s' % line) for line in sys.stdin.readlines()]"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment