Refspec transform should report required output buffer size
Check reference matches pattern during refspec transform