arc90/git-sweep — pull request #7 by dotEvan (2012-04-06 01:03:02+00:00)
Title: Extended CSV Output

Added --csv option to the preview mode. This clears all other output to stdout except information about which branches are able to be deleted. In addition it supplies the date of the last commit and the committer name.

Sample:
$ ./bin/git-sweep preview --csv
command-line,2012-03-26,robmadole
develop,2012-03-26,robmadole
release-0.1.0,2012-03-21,robmadole
release-0.1.1,2012-03-28,robmadole

This can then be imported into something like Google Docs where the responsible parties can then ensure their branches are able to be deleted.

I also added a unit test, but because of the changing date and author of the output of each branch, just doing an assertion of exact string matches won't work that well. I've never used Python before, so not being familiar with, well, anything isn't lending itself to me finding an awesome way to test this. Hopefully someone else can provide a better way of being able to unit or, if you think counting commas will suffice for now, even better :)