Helper functions for generating subpatches with Git