+ allow_empty=('--allow-empty',)
+ if format_version >= 1:
+ allow_empty=()
+ # create a blob for the FORMAT file
+ (status, stdout, _) = _git(args=['hash-object', '-w', '--stdin'], stdout=_subprocess.PIPE,
+ input='{:d}\n'.format(format_version), wait=True)
+ verhash=stdout.rstrip()
+ _LOG.debug('hash of FORMAT blob = {:s}'.format(verhash))
+ # Add FORMAT to the index
+ _git(args=['update-index', '--add', '--cacheinfo', '100644,{:s},FORMAT'.format(verhash)], wait=True)
+