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
diff options
context:
space:
mode:
authoreric sciple <ericsciple@users.noreply.github.com>2020-03-19 00:37:38 -0400
committereric sciple <ericsciple@users.noreply.github.com>2020-03-19 00:37:38 -0400
commit8eaca1c2daa42ecf2774083ab245a4b3dc2c1aaf (patch)
tree3c251713628c7d55955939b366dcd0f6cd736536
parente753d322ded2ac9d95eddd460bd276c3895eeee8 (diff)
.
-rw-r--r--dist/index.js12
-rw-r--r--src/git-directory-helper.ts2
-rw-r--r--src/git-source-provider.ts10
3 files changed, 24 insertions, 0 deletions
diff --git a/dist/index.js b/dist/index.js
index 2625f81..2baed04 100644
--- a/dist/index.js
+++ b/dist/index.js
@@ -5846,13 +5846,17 @@ function getSource(settings) {
stateHelper.setRepositoryPath(settings.repositoryPath);
// Initialize the repository
if (!fsHelper.directoryExistsSync(path.join(settings.repositoryPath, '.git'))) {
+ core.startGroup('Initializing the repository');
yield git.init();
yield git.remoteAdd('origin', initialRemoteUrl);
+ core.endGroup();
}
// Disable automatic garbage collection
+ core.startGroup('Disabling automatic garbage collection');
if (!(yield git.tryDisableAutomaticGarbageCollection())) {
core.warning(`Unable to turn off git automatic garbage collection. The git fetch operation may trigger garbage collection and cause a delay.`);
}
+ core.endGroup();
const authHelper = gitAuthHelper.createAuthHelper(git, settings);
try {
// Configure auth
@@ -5869,7 +5873,9 @@ function getSource(settings) {
yield git.fetch(settings.fetchDepth, refSpec);
core.endGroup();
// Checkout info
+ core.startGroup('Determining the checkout info');
const checkoutInfo = yield refHelper.getCheckoutInfo(git, settings.ref, settings.commit);
+ core.endGroup();
// LFS fetch
// Explicit lfs-fetch to avoid slow checkout (fetches one lfs object at a time).
// Explicit lfs fetch will fetch lfs objects in parallel.
@@ -5880,10 +5886,14 @@ function getSource(settings) {
}
// Fix URL when using SSH
if (settings.sshKey && initialRemoteUrl !== sshUrl) {
+ core.startGroup('Updating the repository to use the SSH URL');
yield git.setRemoteUrl(sshUrl);
+ core.endGroup();
}
// Checkout
+ core.startGroup('Checking out the ref');
yield git.checkout(checkoutInfo.ref, checkoutInfo.startPoint);
+ core.endGroup();
// Submodules
if (settings.submodules) {
try {
@@ -7290,7 +7300,9 @@ function prepareExistingDirectory(git, repositoryPath, preferredRemoteUrl, allow
}
// Update to the preferred remote URL
if (remoteUrl !== preferredRemoteUrl) {
+ core.startGroup('Setting the remote URL');
yield git.setRemoteUrl(preferredRemoteUrl);
+ core.endGroup();
}
}
catch (error) {
diff --git a/src/git-directory-helper.ts b/src/git-directory-helper.ts
index f449e5c..709ed82 100644
--- a/src/git-directory-helper.ts
+++ b/src/git-directory-helper.ts
@@ -94,7 +94,9 @@ export async function prepareExistingDirectory(
// Update to the preferred remote URL
if (remoteUrl !== preferredRemoteUrl) {
+ core.startGroup('Setting the remote URL')
await git.setRemoteUrl(preferredRemoteUrl)
+ core.endGroup()
}
} catch (error) {
core.warning(
diff --git a/src/git-source-provider.ts b/src/git-source-provider.ts
index 8c2a75c..a8590e1 100644
--- a/src/git-source-provider.ts
+++ b/src/git-source-provider.ts
@@ -92,16 +92,20 @@ export async function getSource(settings: IGitSourceSettings): Promise<void> {
if (
!fsHelper.directoryExistsSync(path.join(settings.repositoryPath, '.git'))
) {
+ core.startGroup('Initializing the repository')
await git.init()
await git.remoteAdd('origin', initialRemoteUrl)
+ core.endGroup()
}
// Disable automatic garbage collection
+ core.startGroup('Disabling automatic garbage collection')
if (!(await git.tryDisableAutomaticGarbageCollection())) {
core.warning(
`Unable to turn off git automatic garbage collection. The git fetch operation may trigger garbage collection and cause a delay.`
)
}
+ core.endGroup()
const authHelper = gitAuthHelper.createAuthHelper(git, settings)
try {
@@ -122,11 +126,13 @@ export async function getSource(settings: IGitSourceSettings): Promise<void> {
core.endGroup()
// Checkout info
+ core.startGroup('Determining the checkout info')
const checkoutInfo = await refHelper.getCheckoutInfo(
git,
settings.ref,
settings.commit
)
+ core.endGroup()
// LFS fetch
// Explicit lfs-fetch to avoid slow checkout (fetches one lfs object at a time).
@@ -139,11 +145,15 @@ export async function getSource(settings: IGitSourceSettings): Promise<void> {
// Fix URL when using SSH
if (settings.sshKey && initialRemoteUrl !== sshUrl) {
+ core.startGroup('Updating the repository to use the SSH URL')
await git.setRemoteUrl(sshUrl)
+ core.endGroup()
}
// Checkout
+ core.startGroup('Checking out the ref')
await git.checkout(checkoutInfo.ref, checkoutInfo.startPoint)
+ core.endGroup()
// Submodules
if (settings.submodules) {