gdiff: strip out diff header and git index header