archive_metadata

in lib/gitlab_git/repository.rb [209:224]


      def archive_metadata(ref, storage_path, format = "tar.gz")
        ref ||= root_ref
        commit = Gitlab::Git::Commit.find(self, ref)
        return {} if commit.nil?

        project_name = self.name.chomp('.git')
        prefix = "#{project_name}-#{ref}-#{commit.id}"

        {
          'RepoPath' => path,
          'ArchivePrefix' => prefix,
          'ArchivePath' => archive_file_path(prefix, storage_path, format),
          'CommitId' => commit.id,
        }
      end