Read-only mirror — the public repositories of the Forgejo instance, refreshed every 10 minutes. The live instance (fg.dieschoenewolke.de) is reachable only over the VPN; clone here with https://git.dieschoenewolke.de/git/<owner>/<repo>.git.
summaryrefslogtreecommitdiff
path: root/src/git-source-provider.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/git-source-provider.ts')
-rw-r--r--src/git-source-provider.ts19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/git-source-provider.ts b/src/git-source-provider.ts
index ec87178..452d44e 100644
--- a/src/git-source-provider.ts
+++ b/src/git-source-provider.ts
@@ -109,8 +109,25 @@ export async function getSource(settings: IGitSourceSettings): Promise<void> {
if (
!fsHelper.directoryExistsSync(path.join(settings.repositoryPath, '.git'))
) {
+ core.startGroup('Determining repository object format')
+ const objectFormatResult =
+ await githubApiHelper.tryGetRepositoryObjectFormat(
+ settings.authToken,
+ settings.repositoryOwner,
+ settings.repositoryName,
+ settings.githubServerUrl,
+ settings.commit
+ )
+ const objectFormat = objectFormatResult.succeeded
+ ? objectFormatResult.format
+ : ''
+ if (objectFormat === 'sha256') {
+ core.info('Detected SHA-256 repository object format')
+ }
+ core.endGroup()
+
core.startGroup('Initializing the repository')
- await git.init()
+ await git.init(objectFormat)
await git.remoteAdd('origin', repositoryUrl)
core.endGroup()
}