git_graph.py: extract iteration code
use iteration code in metric
narrow exception section