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:
authoreric sciple <ericsciple@users.noreply.github.com>2020-03-19 00:14:00 -0400
committereric sciple <ericsciple@users.noreply.github.com>2020-03-19 00:14:00 -0400
commite753d322ded2ac9d95eddd460bd276c3895eeee8 (patch)
treef691ad1b1e60d3601dc6fe4051aa1c1a7edaedc3 /src/git-source-provider.ts
parentc740035296f5e758ddba55b13d486eceab434295 (diff)
.
Diffstat (limited to 'src/git-source-provider.ts')
-rw-r--r--src/git-source-provider.ts16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/git-source-provider.ts b/src/git-source-provider.ts
index 9495ece..8c2a75c 100644
--- a/src/git-source-provider.ts
+++ b/src/git-source-provider.ts
@@ -43,7 +43,9 @@ export async function getSource(settings: IGitSourceSettings): Promise<void> {
}
// Git command manager
+ core.startGroup('Getting Git version info')
const git = await getGitCommandManager(settings)
+ core.endGroup()
// Prepare existing directory, otherwise recreate
if (isExisting) {
@@ -104,7 +106,9 @@ export async function getSource(settings: IGitSourceSettings): Promise<void> {
const authHelper = gitAuthHelper.createAuthHelper(git, settings)
try {
// Configure auth
+ core.startGroup('Setting up auth')
await authHelper.configureAuth()
+ core.endGroup()
// LFS install
if (settings.lfs) {
@@ -112,8 +116,10 @@ export async function getSource(settings: IGitSourceSettings): Promise<void> {
}
// Fetch
+ core.startGroup('Fetching the repository')
const refSpec = refHelper.getRefSpec(settings.ref, settings.commit)
await git.fetch(settings.fetchDepth, refSpec)
+ core.endGroup()
// Checkout info
const checkoutInfo = await refHelper.getCheckoutInfo(
@@ -126,7 +132,9 @@ export async function getSource(settings: IGitSourceSettings): Promise<void> {
// Explicit lfs-fetch to avoid slow checkout (fetches one lfs object at a time).
// Explicit lfs fetch will fetch lfs objects in parallel.
if (settings.lfs) {
+ core.startGroup('Fetching LFS objects')
await git.lfsFetch(checkoutInfo.startPoint || checkoutInfo.ref)
+ core.endGroup()
}
// Fix URL when using SSH
@@ -141,9 +149,12 @@ export async function getSource(settings: IGitSourceSettings): Promise<void> {
if (settings.submodules) {
try {
// Temporarily override global config
+ core.startGroup('Setting up auth for fetching submodules')
await authHelper.configureGlobalAuth()
+ core.endGroup()
// Checkout submodules
+ core.startGroup('Fetching submodules')
await git.submoduleSync(settings.nestedSubmodules)
await git.submoduleUpdate(
settings.fetchDepth,
@@ -153,10 +164,13 @@ export async function getSource(settings: IGitSourceSettings): Promise<void> {
'git config --local gc.auto 0',
settings.nestedSubmodules
)
+ core.endGroup()
// Persist credentials
if (settings.persistCredentials) {
+ core.startGroup('Persisting credentials for submodules')
await authHelper.configureSubmoduleAuth()
+ core.endGroup()
}
} finally {
// Remove temporary global config override
@@ -169,7 +183,9 @@ export async function getSource(settings: IGitSourceSettings): Promise<void> {
} finally {
// Remove auth
if (!settings.persistCredentials) {
+ core.startGroup('Removing auth')
await authHelper.removeAuth()
+ core.endGroup()
}
}
}