@content_git_object_init.connect
def git_sha_metadata(content, git_content):
 if (not content.settings['GIT_SHA_METADATA']):
  return
 if (not git_content.is_committed()):
  return
 content.metadata['gitsha_newest'] = str(git_content.get_newest_commit())
 content.metadata['gitsha_oldest'] = str(git_content.get_oldest_commit())

@ content_git_object_init . connect def git_sha_metadata ( content , git_content ) : if ( not content . settings [ 'GIT_SHA_METADATA' ] ) : return if ( not git_content . is_committed ( ) ) : return content . metadata [ 'gitsha_newest' ] = str ( git_content . get_newest_commit ( ) ) content . metadata [ 'gitsha_oldest' ] = str ( git_content . get_oldest_commit ( ) )
add sha metadata to content .