Skip to content

Commit 38c19d2

Browse files
committed
update comment
1 parent 00666bd commit 38c19d2

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

services/mirror/mirror_pull.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -365,8 +365,9 @@ func runSync(ctx context.Context, m *repo_model.Mirror) ([]*mirrorSyncResult, bo
365365
stderrBuilder.Reset()
366366
stdoutBuilder.Reset()
367367

368-
// check whether the remote still exists before remote update prune
369-
// this is needed because prune will not fail if the remote does not exist
368+
// Verify that the remote exists before running `git remote update --prune`.
369+
// Without this check, the command will not fail if the remote is missing;
370+
// it will appear to succeed silently, even though nothing was updated.
370371
_, err := gitrepo.GitRemoteGetURL(ctx, m.Repo.WikiStorageRepo(), m.GetRemoteName())
371372
if err != nil {
372373
log.Error("SyncMirrors [repo: %-v Wiki]: GetRemoteURL Error %v", m.Repo, err)

0 commit comments

Comments
 (0)