Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWill Chandler <wchandler@gitlab.com>2024-01-18 00:57:51 +0300
committerGitLab <noreply@gitlab.com>2024-01-18 00:57:51 +0300
commit72faf14d9551b706f46103d665d75099ea8b1b0c (patch)
tree85abb862a6a39219643585785869aa626964cffb
parent2f1b99e352ec5c4e270e7ecb9e4234244bf37dee (diff)
parent36339ff6300a2cc727441aa897e2793bd2fcd98a (diff)
Merge branch 'xx/fix-typos' into 'master'
fix: Fix a collection of typos found by typos-cli See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/6594 Merged-by: Will Chandler <wchandler@gitlab.com> Approved-by: Evan Read <eread@gitlab.com> Co-authored-by: Xing Xin <xingxin.xx@bytedance.com>
-rw-r--r--Makefile4
-rw-r--r--STYLE.md2
-rw-r--r--_support/terraform/README.md2
-rw-r--r--cmd/gitaly-hooks/hooks.go2
-rw-r--r--config.praefect.toml.example2
-rw-r--r--doc/protobuf.md4
-rw-r--r--doc/release.md2
-rw-r--r--internal/backup/sink_test.go2
-rw-r--r--internal/cli/praefect/serve.go2
-rw-r--r--internal/cli/praefect/subcmd_list_storages.go2
-rw-r--r--internal/cli/praefect/subcmd_set_replication_factor_test.go2
-rw-r--r--internal/cli/praefect/subcmd_sql_migrate_test.go2
-rw-r--r--internal/git/command.go2
-rw-r--r--internal/git/gittest/command.go2
-rw-r--r--internal/git/gittest/commit_test.go2
-rw-r--r--internal/git/gittest/tree_test.go2
-rw-r--r--internal/git/housekeeping/clean_stale_data.go2
-rw-r--r--internal/git/housekeeping/objects.go2
-rw-r--r--internal/git/housekeeping/optimize_repository.go2
-rw-r--r--internal/git/localrepo/commit.go6
-rw-r--r--internal/git/localrepo/merge.go2
-rw-r--r--internal/git/localrepo/tree.go2
-rw-r--r--internal/git/localrepo/tree_test.go2
-rw-r--r--internal/git/updateref/updateref.go2
-rw-r--r--internal/gitaly/gitalyclient/upload_pack.go2
-rw-r--r--internal/gitaly/service/conflicts/resolve_conflicts_test.go2
-rw-r--r--internal/gitaly/service/objectpool/create.go2
-rw-r--r--internal/gitaly/service/objectpool/fetch_into_object_pool_test.go2
-rw-r--r--internal/gitaly/service/operations/merge_to_ref_test.go2
-rw-r--r--internal/gitaly/service/operations/revert.go6
-rw-r--r--internal/gitaly/service/operations/squash_test.go6
-rw-r--r--internal/gitaly/service/ref/find_all_tags_test.go2
-rw-r--r--internal/gitaly/service/ref/find_tag_test.go2
-rw-r--r--internal/gitaly/service/repository/create_repository_from_snapshot_test.go2
-rw-r--r--internal/gitaly/service/repository/fetch_remote_test.go2
-rw-r--r--internal/gitaly/service/repository/size_test.go16
-rw-r--r--internal/gitaly/storage/metadata_test.go2
-rw-r--r--internal/gitaly/storage/storagemgr/partition_manager.go2
-rw-r--r--internal/gitaly/storage/storagemgr/transaction_manager.go8
-rw-r--r--internal/gitaly/storage/storagemgr/transaction_manager_hook_test.go4
-rw-r--r--internal/grpc/client/dial.go2
-rw-r--r--internal/grpc/middleware/limithandler/middleware.go2
-rw-r--r--internal/grpc/middleware/sentryhandler/sentryhandler_test.go2
-rw-r--r--internal/grpc/proxy/peeker.go2
-rw-r--r--internal/grpc/sidechannel/sidechannel_test.go2
-rw-r--r--internal/helper/env/env.go2
-rw-r--r--internal/helper/text/random.go2
-rw-r--r--internal/limiter/resizable_semaphore_test.go4
-rw-r--r--internal/log/configure.go2
-rw-r--r--internal/praefect/assignment.go2
-rw-r--r--internal/praefect/coordinator.go4
-rw-r--r--internal/praefect/nodes/per_repository.go2
-rw-r--r--internal/praefect/reconciler/reconciler_test.go8
-rw-r--r--internal/praefect/replicator_test.go2
-rw-r--r--internal/praefect/repocleaner/repository_test.go4
-rw-r--r--internal/praefect/server.go2
-rw-r--r--internal/safe/file_writer.go2
-rw-r--r--internal/streamcache/cache.go2
-rw-r--r--internal/streamcache/min_occurrences.go (renamed from internal/streamcache/min_occurences.go)0
-rw-r--r--internal/testhelper/directory.go2
-rw-r--r--internal/transaction/txinfo/transaction.go4
-rw-r--r--proto/blob.proto4
-rw-r--r--proto/commit.proto10
-rw-r--r--proto/diff.proto4
-rw-r--r--proto/errors.proto4
-rw-r--r--proto/go/gitalypb/blob.pb.go4
-rw-r--r--proto/go/gitalypb/commit.pb.go10
-rw-r--r--proto/go/gitalypb/diff.pb.go2
-rw-r--r--proto/go/gitalypb/diff_grpc.pb.go4
-rw-r--r--proto/go/gitalypb/errors.pb.go4
-rw-r--r--proto/go/gitalypb/remote.pb.go2
-rw-r--r--proto/remote.proto2
72 files changed, 111 insertions, 111 deletions
diff --git a/Makefile b/Makefile
index b5a757c30..ba51a9acc 100644
--- a/Makefile
+++ b/Makefile
@@ -465,7 +465,7 @@ lint-proto: ${PROTOC} ${PROTOLINT} ${PROTOC_GEN_GITALY_LINT}
${Q}${PROTOLINT} lint -config_dir_path=${SOURCE_DIR}/proto ${SOURCE_DIR}/proto/*.proto
.PHONY: build-proto-gem
-## Build the Ruby Gem that contains Gitaly's Protobuf definitons.
+## Build the Ruby Gem that contains Gitaly's Protobuf definitions.
build-proto-gem:
${Q}rm -rf "${BUILD_DIR}/${BUILD_GEM_NAME}.gem" && mkdir -p ${BUILD_DIR}
${Q}rm -rf "${BUILD_DIR}/${BUILD_GEM_NAME}-gem" && mkdir -p ${BUILD_DIR}/${BUILD_GEM_NAME}-gem
@@ -473,7 +473,7 @@ build-proto-gem:
${Q}"${SOURCE_DIR}"/tools/protogem/build-proto-gem -o "${BUILD_DIR}/${BUILD_GEM_NAME}.gem" --name ${BUILD_GEM_NAME} --working-dir ${BUILD_DIR}/${BUILD_GEM_NAME}-gem ${BUILD_GEM_OPTIONS}
.PHONY: publish-proto-gem
-## Build and publish the Ruby Gem that contains Gitaly's Protobuf definitons.
+## Build and publish the Ruby Gem that contains Gitaly's Protobuf definitions.
publish-proto-gem: build-proto-gem
${Q}gem push "${BUILD_DIR}/gitaly.gem"
diff --git a/STYLE.md b/STYLE.md
index 6b54b5791..718bf2716 100644
--- a/STYLE.md
+++ b/STYLE.md
@@ -145,7 +145,7 @@ With this error model, the server can attach structured Protobuf messages to
errors returned to the client. These Protobuf messages can be extracted on the
client side to allow more fine-grained error handling. Error details should be
added to an error when you know that the client side needs to base its
-behavior on the specific error that has occured.
+behavior on the specific error that has occurred.
For an RPC `Frobnicate()`, the error details should be of the message type
`FrobnicateError`. The different error cases should then be wrapped into a
diff --git a/_support/terraform/README.md b/_support/terraform/README.md
index d52905424..180247664 100644
--- a/_support/terraform/README.md
+++ b/_support/terraform/README.md
@@ -30,7 +30,7 @@ to install it on your system.
```
This will open a browser to sign into GCP if necessary. Ansible will then ask
-you a set of questions before it performs the deplyoment.
+you a set of questions before it performs the deployment.
When the script is done, `apt-get install gitlab-ee` is still busy
running in the background on your new VM's.
diff --git a/cmd/gitaly-hooks/hooks.go b/cmd/gitaly-hooks/hooks.go
index cb10dfae9..a22fe8bea 100644
--- a/cmd/gitaly-hooks/hooks.go
+++ b/cmd/gitaly-hooks/hooks.go
@@ -429,7 +429,7 @@ func packObjectsHook(ctx context.Context, payload git.HooksPayload, hookClient g
return hookError{returnCode: 1, err: fmt.Errorf("RPC failed: SetupSidechannel: %w", err)}
}
defer func() {
- // We aleady check the error further down.
+ // We already check the error further down.
_ = wt.Close()
}()
diff --git a/config.praefect.toml.example b/config.praefect.toml.example
index f7daaf128..99b83fdba 100644
--- a/config.praefect.toml.example
+++ b/config.praefect.toml.example
@@ -20,7 +20,7 @@ listen_addr = "127.0.0.1:2305"
# [logging]
# format = "json"
# # Optional: Set log level to only log entries with that severity or above
-# # One of, in order: debug, info, warn, errror, fatal, panic
+# # One of, in order: debug, info, warn, error, fatal, panic
# # Defaults to "info"
# level = "warn"
# [sentry]
diff --git a/doc/protobuf.md b/doc/protobuf.md
index c086caa73..5af7543c9 100644
--- a/doc/protobuf.md
+++ b/doc/protobuf.md
@@ -200,7 +200,7 @@ data inside repositories, so we can rarely assume data to be a Protobuf "string"
### Stream patterns
-Protobuf suppports streaming RPCs which allow for multiple request or response
+Protobuf supports streaming RPCs which allow for multiple request or response
messages to be sent in a single RPC call. We use these whenever it is expected
that an RPC may be invoked with lots of input parameters or when it may generate
a lot of data. This is required by limitations in the gRPC framework where
@@ -320,7 +320,7 @@ To declare the scope, mutators must contain one of the following lines:
tagged with `[(storage)=true]` that indicates the storage's name.
- `option(op_type).scope = REPOSITORY;`: This is the default scoped and thus
doesn't need to be explicitly declared. The associated request must have a
- field tagged with `[(target_repository)=true]` that indcates the repository's
+ field tagged with `[(target_repository)=true]` that indicates the repository's
location.
The target repository represents the location or address of the repository being
diff --git a/doc/release.md b/doc/release.md
index 4c5540e8f..14ebb50af 100644
--- a/doc/release.md
+++ b/doc/release.md
@@ -13,7 +13,7 @@ sequenceDiagram
release-tools bot->>gitlab-org/security/gitaly: Get latest green commit on default branch
release-tools bot->>gitlab-org/gitlab: Create "Update Gitaly version" MR
deactivate release-tools bot
- alt Pipeline succeded
+ alt Pipeline succeeded
gitlab-org/gitlab->>gitlab-org/gitlab: Merge and deploy
gitlab-org/gitlab->>Slack gitaly_alerts: Deployment progress
else Pipeline failed
diff --git a/internal/backup/sink_test.go b/internal/backup/sink_test.go
index 5eb337147..4c5942492 100644
--- a/internal/backup/sink_test.go
+++ b/internal/backup/sink_test.go
@@ -39,7 +39,7 @@ func TestResolveSink(t *testing.T) {
"type": "service_account",
"project_id": "hostfactory-179005",
"private_key_id": "6253b144ccd94f50ce1224a73ffc48bda256d0a7",
- "private_key": "-----BEGIN PRIVATE KEY-----\nXXXX<KEY CONTENT OMMIT HERR> \n-----END PRIVATE KEY-----\n",
+ "private_key": "-----BEGIN PRIVATE KEY-----\nXXXX<KEY CONTENT OMIT HERE> \n-----END PRIVATE KEY-----\n",
"client_email": "303721356529-compute@developer.gserviceaccount.com",
"client_id": "116595416948414952474",
"auth_uri": "https://accounts.google.com/o/oauth2/auth",
diff --git a/internal/cli/praefect/serve.go b/internal/cli/praefect/serve.go
index 74f155e3e..cf9d84b57 100644
--- a/internal/cli/praefect/serve.go
+++ b/internal/cli/praefect/serve.go
@@ -344,7 +344,7 @@ func server(
} else {
if conf.Failover.Enabled {
logger.WithField("election_strategy", conf.Failover.ElectionStrategy).Warn(
- "Deprecated election stategy in use, migrate to repository specific primary nodes following https://docs.gitlab.com/ee/administration/gitaly/praefect.html#migrate-to-repository-specific-primary-gitaly-nodes. The other election strategies are scheduled for removal in GitLab 14.0.")
+ "Deprecated election strategy in use, migrate to repository specific primary nodes following https://docs.gitlab.com/ee/administration/gitaly/praefect.html#migrate-to-repository-specific-primary-gitaly-nodes. The other election strategies are scheduled for removal in GitLab 14.0.")
}
nodeMgr, err := nodes.NewManager(logger, conf, db, csg, nodeLatencyHistogram, protoregistry.GitalyProtoPreregistered, errTracker, clientHandshaker, sidechannelRegistry)
diff --git a/internal/cli/praefect/subcmd_list_storages.go b/internal/cli/praefect/subcmd_list_storages.go
index 816a811bf..c2b89202c 100644
--- a/internal/cli/praefect/subcmd_list_storages.go
+++ b/internal/cli/praefect/subcmd_list_storages.go
@@ -18,7 +18,7 @@ Returns a table with the following columns:
- VIRTUAL_STORAGE: Name of the virtual storage Praefect provides to clients.
- NODE: Name the physical storage connected to the virtual storage.
-- ADDRESS: Address of the Gitaly node that manages the physial storage for the virtual storage.
+- ADDRESS: Address of the Gitaly node that manages the physical storage for the virtual storage.
If the virtual-storage flag:
diff --git a/internal/cli/praefect/subcmd_set_replication_factor_test.go b/internal/cli/praefect/subcmd_set_replication_factor_test.go
index d2f3615cf..7c70d28ca 100644
--- a/internal/cli/praefect/subcmd_set_replication_factor_test.go
+++ b/internal/cli/praefect/subcmd_set_replication_factor_test.go
@@ -30,7 +30,7 @@ func TestSetReplicationFactorSubcommand(t *testing.T) {
}{
{
desc: "unexpected positional arguments",
- args: []string{"-virtual-storage=virtual-storage", "-relative-path=relative-path", "-replication-factor=1", "positonal-arg"},
+ args: []string{"-virtual-storage=virtual-storage", "-relative-path=relative-path", "-replication-factor=1", "positional-arg"},
error: cli.Exit(unexpectedPositionalArgsError{Command: "set-replication-factor"}, 1),
},
{
diff --git a/internal/cli/praefect/subcmd_sql_migrate_test.go b/internal/cli/praefect/subcmd_sql_migrate_test.go
index 880c01555..387dd7588 100644
--- a/internal/cli/praefect/subcmd_sql_migrate_test.go
+++ b/internal/cli/praefect/subcmd_sql_migrate_test.go
@@ -33,7 +33,7 @@ func TestSubCmdSqlMigrate(t *testing.T) {
}{
{
desc: "unexpected positional arguments",
- args: []string{"positonal-arg"},
+ args: []string{"positional-arg"},
expectedErr: cli.Exit(unexpectedPositionalArgsError{Command: "sql-migrate"}, 1),
},
{
diff --git a/internal/git/command.go b/internal/git/command.go
index f5645fc96..d14568856 100644
--- a/internal/git/command.go
+++ b/internal/git/command.go
@@ -18,7 +18,7 @@ var (
// Command represent a Git command.
type Command struct {
- // Name is the name of the Git command to run, e.g. "log", "cat-flie" or "worktree".
+ // Name is the name of the Git command to run, e.g. "log", "cat-file" or "worktree".
Name string
// Action is the action of the Git command, e.g. "set-url" in `git remote set-url`
Action string
diff --git a/internal/git/gittest/command.go b/internal/git/gittest/command.go
index c5eef143c..c917388e9 100644
--- a/internal/git/gittest/command.go
+++ b/internal/git/gittest/command.go
@@ -128,7 +128,7 @@ type RepositoryPathExecutor struct {
factory git.CommandFactory
}
-// NewRepositoryPathExecutor creates a new ReposiotryPathExecutor for the given repository.
+// NewRepositoryPathExecutor creates a new RepositoryPathExecutor for the given repository.
func NewRepositoryPathExecutor(tb testing.TB, cfg config.Cfg, repoPath string) RepositoryPathExecutor {
relativePath, err := filepath.Rel(cfg.Storages[0].Path, repoPath)
require.NoError(tb, err)
diff --git a/internal/git/gittest/commit_test.go b/internal/git/gittest/commit_test.go
index 4f35f7ad2..9efb5a9ac 100644
--- a/internal/git/gittest/commit_test.go
+++ b/internal/git/gittest/commit_test.go
@@ -69,7 +69,7 @@ func TestWriteCommit(t *testing.T) {
}, "\n"),
},
{
- desc: "with commiter",
+ desc: "with committer",
opts: []WriteCommitOption{
WithCommitterName("John Doe"),
WithCommitterDate(time.Date(2005, 4, 7, 15, 13, 13, 0, time.FixedZone("UTC-7", -7*60*60))),
diff --git a/internal/git/gittest/tree_test.go b/internal/git/gittest/tree_test.go
index c922deb31..35d37ef0f 100644
--- a/internal/git/gittest/tree_test.go
+++ b/internal/git/gittest/tree_test.go
@@ -120,7 +120,7 @@ func TestWriteTree(t *testing.T) {
},
},
{
- desc: "two entries with nonexistant objects",
+ desc: "two entries with nonexistent objects",
entries: []TreeEntry{
{
OID: git.ObjectID(strings.Repeat("1", DefaultObjectHash.Hash().Size()*2)),
diff --git a/internal/git/housekeeping/clean_stale_data.go b/internal/git/housekeeping/clean_stale_data.go
index 22149d639..a425449e3 100644
--- a/internal/git/housekeeping/clean_stale_data.go
+++ b/internal/git/housekeeping/clean_stale_data.go
@@ -290,7 +290,7 @@ func findStaleFiles(repoPath string, gracePeriod time.Duration, files ...string)
}
// findStaleLockfiles finds a subset of lockfiles which may be created by git
-// commands. We're quite conservative with what we're removing, we certaintly
+// commands. We're quite conservative with what we're removing, we certainly
// don't just scan the repo for `*.lock` files. Instead, we only remove a known
// set of lockfiles which have caused problems in the past.
func findStaleLockfiles(ctx context.Context, repoPath string) ([]string, error) {
diff --git a/internal/git/housekeeping/objects.go b/internal/git/housekeeping/objects.go
index d83a13ef5..c3d4c3696 100644
--- a/internal/git/housekeeping/objects.go
+++ b/internal/git/housekeeping/objects.go
@@ -153,7 +153,7 @@ func RepackObjects(ctx context.Context, repo *localrepo.Repo, cfg RepackObjectsC
},
},
// Note: we explicitly do not pass `GetRepackGitConfig()` here as none of
- // its opitons apply to this kind of repack: we have no delta islands given
+ // its options apply to this kind of repack: we have no delta islands given
// that we do not walk the revision graph, and we won't ever write bitmaps.
git.WithStderr(&stderr),
); err != nil {
diff --git a/internal/git/housekeeping/optimize_repository.go b/internal/git/housekeeping/optimize_repository.go
index 1dc0d9337..0396d39ad 100644
--- a/internal/git/housekeeping/optimize_repository.go
+++ b/internal/git/housekeeping/optimize_repository.go
@@ -160,7 +160,7 @@ func optimizeRepository(
timer := prometheus.NewTimer(m.tasksLatency.WithLabelValues("clean-stale-data"))
if err := m.CleanStaleData(ctx, repo, DefaultStaleDataCleanup()); err != nil {
- return fmt.Errorf("could not execute houskeeping: %w", err)
+ return fmt.Errorf("could not execute housekeeping: %w", err)
}
timer.ObserveDuration()
diff --git a/internal/git/localrepo/commit.go b/internal/git/localrepo/commit.go
index 2f77069ef..bdb7bb990 100644
--- a/internal/git/localrepo/commit.go
+++ b/internal/git/localrepo/commit.go
@@ -21,13 +21,13 @@ import (
)
var (
- // ErrMissingTree indicates a missing tree when attemping to write a commit
+ // ErrMissingTree indicates a missing tree when attempting to write a commit
ErrMissingTree = errors.New("missing tree")
// ErrMissingCommitterName indicates an attempt to write a commit without a
- // comitter name
+ // committer name
ErrMissingCommitterName = errors.New("missing committer name")
// ErrMissingAuthorName indicates an attempt to write a commit without a
- // comitter name
+ // committer name
ErrMissingAuthorName = errors.New("missing author name")
// ErrDisallowedCharacters indicates the name and/or email contains disallowed
// characters
diff --git a/internal/git/localrepo/merge.go b/internal/git/localrepo/merge.go
index c721268ba..44bbae3ef 100644
--- a/internal/git/localrepo/merge.go
+++ b/internal/git/localrepo/merge.go
@@ -167,7 +167,7 @@ func parseMergeTreeError(objectHash git.ObjectHash, cfg mergeTreeConfig, output
}
fields := strings.Split(infoMsg, "\x00")
- // The git output contains a null characted at the end, which creates a stray empty field.
+ // The git output contains a null character at the end, which creates a stray empty field.
fields = fields[:len(fields)-1]
for i := 0; i < len(fields); {
diff --git a/internal/git/localrepo/tree.go b/internal/git/localrepo/tree.go
index b436e4c56..ed8464999 100644
--- a/internal/git/localrepo/tree.go
+++ b/internal/git/localrepo/tree.go
@@ -504,7 +504,7 @@ func (t *TreeEntry) populate(
stack := treeStack{t}
- // The outpout of ls-tree -r is the following:
+ // The output of ls-tree -r is the following:
// a1
// dir1/file2
// dir2/file3
diff --git a/internal/git/localrepo/tree_test.go b/internal/git/localrepo/tree_test.go
index 3e7398f18..a68999d12 100644
--- a/internal/git/localrepo/tree_test.go
+++ b/internal/git/localrepo/tree_test.go
@@ -1393,7 +1393,7 @@ func TestTreeEntry_Delete(t *testing.T) {
},
},
{
- desc: "nested tree with only single childs",
+ desc: "nested tree with only single child",
tree: &TreeEntry{
Type: Tree,
Mode: "040000",
diff --git a/internal/git/updateref/updateref.go b/internal/git/updateref/updateref.go
index 9979e7d83..b8a86df1d 100644
--- a/internal/git/updateref/updateref.go
+++ b/internal/git/updateref/updateref.go
@@ -360,7 +360,7 @@ func (u *Updater) checkState(expected state) error {
return nil
}
-// Start begins a new reference transaction. The reference changes are not perfromed until Commit
+// Start begins a new reference transaction. The reference changes are not performed until Commit
// is explicitly called.
func (u *Updater) Start() error {
if err := u.expectState(stateIdle); err != nil {
diff --git a/internal/gitaly/gitalyclient/upload_pack.go b/internal/gitaly/gitalyclient/upload_pack.go
index bd4f697c8..48ca39eca 100644
--- a/internal/gitaly/gitalyclient/upload_pack.go
+++ b/internal/gitaly/gitalyclient/upload_pack.go
@@ -66,7 +66,7 @@ func UploadPackWithSidechannel(
return stream.ProxyPktLine(c, stdin, stdout, stderr)
})
defer func() {
- // We aleady check the error further down.
+ // We already check the error further down.
_ = wt.Close()
}()
diff --git a/internal/gitaly/service/conflicts/resolve_conflicts_test.go b/internal/gitaly/service/conflicts/resolve_conflicts_test.go
index 65c5fd71b..ac7faff31 100644
--- a/internal/gitaly/service/conflicts/resolve_conflicts_test.go
+++ b/internal/gitaly/service/conflicts/resolve_conflicts_test.go
@@ -1320,7 +1320,7 @@ func testResolveConflicts(t *testing.T, ctx context.Context) {
skipCommitCheck: true,
additionalChecks: func() {
objectsAfter := len(strings.Split(text.ChompBytes(gittest.Exec(t, cfg, "-C", repoPath, "rev-list", "--objects", "--all")), "\n"))
- require.Equal(t, objectsBefore, objectsAfter, "No new objets should've been added")
+ require.Equal(t, objectsBefore, objectsAfter, "No new objects should've been added")
},
}
},
diff --git a/internal/gitaly/service/objectpool/create.go b/internal/gitaly/service/objectpool/create.go
index 29691d41f..53d52cdc8 100644
--- a/internal/gitaly/service/objectpool/create.go
+++ b/internal/gitaly/service/objectpool/create.go
@@ -32,7 +32,7 @@ func (s *server) CreateObjectPool(ctx context.Context, in *gitalypb.CreateObject
// repoutil.Create creates the repositories in a temporary directory. This means the repository is not created in the location
// expected by the transaction manager. This makes sense without transactions, but with transactions, there's no real point in
// doing so given a failed transaction's state is anyway removed. Creating the repository in a temporary directory is problematic
- // as the reference transcation hook is invoked for the repository from unexpected location, causing the transaction to fail to
+ // as the reference transaction hook is invoked for the repository from unexpected location, causing the transaction to fail to
// associate the reference updates with the repository.
//
// Run the repository creation without the transaction in the context. The transactions reads the created repository's state from
diff --git a/internal/gitaly/service/objectpool/fetch_into_object_pool_test.go b/internal/gitaly/service/objectpool/fetch_into_object_pool_test.go
index 4e1a5343e..574e3b596 100644
--- a/internal/gitaly/service/objectpool/fetch_into_object_pool_test.go
+++ b/internal/gitaly/service/objectpool/fetch_into_object_pool_test.go
@@ -125,7 +125,7 @@ func TestFetchIntoObjectPool_transactional(t *testing.T) {
poolProto, pool, poolPath := createObjectPool(t, ctx, cfg, repo)
- // Inject transaction information so that FetchInotObjectPool knows to perform
+ // Inject transaction information so that FetchIntoObjectPool knows to perform
// transactional voting.
ctx, err = txinfo.InjectTransaction(peer.NewContext(ctx, &peer.Peer{}), 1, "node", true)
require.NoError(t, err)
diff --git a/internal/gitaly/service/operations/merge_to_ref_test.go b/internal/gitaly/service/operations/merge_to_ref_test.go
index 28863e136..3781ffd71 100644
--- a/internal/gitaly/service/operations/merge_to_ref_test.go
+++ b/internal/gitaly/service/operations/merge_to_ref_test.go
@@ -218,7 +218,7 @@ func testUserMergeToRefConflicts(t *testing.T, ctx context.Context) {
require.False(t, hasRevision, "branch should not have been created")
})
- t.Run("target reference is ambigous", func(t *testing.T) {
+ t.Run("target reference is ambiguous", func(t *testing.T) {
gittest.WriteRef(t, cfg, repoPath, "refs/merge-requests/x/written-before", right)
request := &gitalypb.UserMergeToRefRequest{
diff --git a/internal/gitaly/service/operations/revert.go b/internal/gitaly/service/operations/revert.go
index 90d03a7dd..98efe8e84 100644
--- a/internal/gitaly/service/operations/revert.go
+++ b/internal/gitaly/service/operations/revert.go
@@ -199,7 +199,7 @@ func (s *Server) UserRevert(ctx context.Context, req *gitalypb.UserRevertRequest
// housekeeping.
func (s *Server) writeCommitWithEmptyTree(ctx context.Context, quarantineRepo *localrepo.Repo) (git.ObjectID, error) {
const fakeName = "GitLab Bot"
- const fakcEmail = "gitlab-bot@gitlab.com"
+ const fakeEmail = "gitlab-bot@gitlab.com"
fakeDate := time.Unix(694540800, 0).UTC()
hash, err := quarantineRepo.ObjectHash(ctx)
@@ -209,10 +209,10 @@ func (s *Server) writeCommitWithEmptyTree(ctx context.Context, quarantineRepo *l
return quarantineRepo.WriteCommit(ctx, localrepo.WriteCommitConfig{
AuthorName: fakeName,
- AuthorEmail: fakcEmail,
+ AuthorEmail: fakeEmail,
AuthorDate: fakeDate,
CommitterName: fakeName,
- CommitterEmail: fakcEmail,
+ CommitterEmail: fakeEmail,
CommitterDate: fakeDate,
TreeID: hash.EmptyTreeOID,
})
diff --git a/internal/gitaly/service/operations/squash_test.go b/internal/gitaly/service/operations/squash_test.go
index 1225c1a05..80b613e9d 100644
--- a/internal/gitaly/service/operations/squash_test.go
+++ b/internal/gitaly/service/operations/squash_test.go
@@ -260,7 +260,7 @@ func testUserSquashStableID(t *testing.T, ctx context.Context) {
startCommitID := gittest.WriteCommit(t, cfg, repoPath, gittest.WithParents(baseCommitID))
midCommitID := gittest.WriteCommit(t, cfg, repoPath, gittest.WithParents(startCommitID))
endTreeID := gittest.WriteTree(t, cfg, repoPath, []gittest.TreeEntry{
- {Path: "path", Mode: "100644", Content: "contnet"},
+ {Path: "path", Mode: "100644", Content: "content"},
})
endCommitID := gittest.WriteCommit(t, cfg, repoPath, gittest.WithParents(midCommitID), gittest.WithTree(endTreeID))
@@ -281,8 +281,8 @@ func testUserSquashStableID(t *testing.T, ctx context.Context) {
require.NoError(t, err)
require.Equal(t, &gitalypb.GitCommit{
Id: gittest.ObjectHashDependent(t, map[string]string{
- "sha1": "9b09504be226a140ca5335bfbfd70bea049233c6",
- "sha256": "879204016902e3773af456d01465da8749adb17bdc3a974d5500231b80d497fa",
+ "sha1": "81a602b7dbbc79e6aae871477d62902c61373741",
+ "sha256": "fe8de63f9481d39a3db08ebf1ce692844eb35fef6d5baf9ccc748f97d079ff54",
}),
TreeId: endTreeID.String(),
ParentIds: []string{
diff --git a/internal/gitaly/service/ref/find_all_tags_test.go b/internal/gitaly/service/ref/find_all_tags_test.go
index 91288dca5..13a8c4b5d 100644
--- a/internal/gitaly/service/ref/find_all_tags_test.go
+++ b/internal/gitaly/service/ref/find_all_tags_test.go
@@ -350,7 +350,7 @@ type commit
tag signed-tag
tagger Some Author <some.author@example.com> 100000000 +0100
gpgsig -----BEGIN PGP SIGNATURE-----
- this is a pseude PGP signature
+ this is a pseudo PGP signature
-----END PGP SIGNATURE-----
signed tag message
diff --git a/internal/gitaly/service/ref/find_tag_test.go b/internal/gitaly/service/ref/find_tag_test.go
index 7439358f2..3e1df7d00 100644
--- a/internal/gitaly/service/ref/find_tag_test.go
+++ b/internal/gitaly/service/ref/find_tag_test.go
@@ -315,7 +315,7 @@ type commit
tag signed-tag
tagger Some Author <some.author@example.com> 100000000 +0100
gpgsig -----BEGIN PGP SIGNATURE-----
- this is a pseude PGP signature
+ this is a pseudo PGP signature
-----END PGP SIGNATURE-----
signed tag message
diff --git a/internal/gitaly/service/repository/create_repository_from_snapshot_test.go b/internal/gitaly/service/repository/create_repository_from_snapshot_test.go
index a0dee4caa..11feb1117 100644
--- a/internal/gitaly/service/repository/create_repository_from_snapshot_test.go
+++ b/internal/gitaly/service/repository/create_repository_from_snapshot_test.go
@@ -249,7 +249,7 @@ func TestCreateRepositoryFromSnapshot_malformedArchive(t *testing.T) {
// to https://gitlab.com/gitlab-org/gitaly/-/issues/5503.
_, sourceRepoPath := gittest.CreateRepository(t, ctx, cfg)
gittest.WriteCommit(t, cfg, sourceRepoPath, gittest.WithBranch(git.DefaultBranch), gittest.WithTreeEntries(
- gittest.TreeEntry{Path: "blob", Mode: "100644", Content: string(uncompressibleData(16 * 1024))},
+ gittest.TreeEntry{Path: "blob", Mode: "100644", Content: string(incompressibleData(16 * 1024))},
))
data, _ := generateTarFile(t, sourceRepoPath)
diff --git a/internal/gitaly/service/repository/fetch_remote_test.go b/internal/gitaly/service/repository/fetch_remote_test.go
index 6f0c1ea17..c11328cec 100644
--- a/internal/gitaly/service/repository/fetch_remote_test.go
+++ b/internal/gitaly/service/repository/fetch_remote_test.go
@@ -623,7 +623,7 @@ Issue: https://gitlab.com/gitlab-org/gitaly/-/issues/3780`)
setup: func(t *testing.T, cfg config.Cfg) setupData {
// We set up two branches in both repositories:
//
- // - "main" diverges as both repostiories have different commits on
+ // - "main" diverges as both repositories have different commits on
// it.
// - "branch" does not diverge, but is out-of-date in the local
// repository.
diff --git a/internal/gitaly/service/repository/size_test.go b/internal/gitaly/service/repository/size_test.go
index d955d33ad..1684793b0 100644
--- a/internal/gitaly/service/repository/size_test.go
+++ b/internal/gitaly/service/repository/size_test.go
@@ -38,7 +38,7 @@ Object pools are not yet supported with transaction management.`)
// a packfile or otherwise it won't get pulled into the object pool. We thus repack the repository first before
// linking it to the pool repository.
gittest.WriteCommit(t, cfg, repoPath, gittest.WithBranch(git.DefaultBranch), gittest.WithTreeEntries(
- gittest.TreeEntry{Mode: "100644", Path: "16kbblob", Content: string(uncompressibleData(16 * 1000))},
+ gittest.TreeEntry{Mode: "100644", Path: "16kbblob", Content: string(incompressibleData(16 * 1000))},
))
gittest.Exec(t, cfg, "-C", repoPath, "repack", "-Adl")
requireRepositorySize(t, ctx, client, repo, 17)
@@ -66,15 +66,15 @@ func TestRepositorySize_normalRepository(t *testing.T) {
requireRepositorySize(t, ctx, client, repo, 0)
// When writing a largish blob into the repository it's expected to grow.
- gittest.WriteBlob(t, cfg, repoPath, uncompressibleData(16*1024))
+ gittest.WriteBlob(t, cfg, repoPath, incompressibleData(16*1024))
requireRepositorySize(t, ctx, client, repo, 16)
// Also, updating any other files should cause a size increase.
- require.NoError(t, os.WriteFile(filepath.Join(repoPath, "packed-refs"), uncompressibleData(7*1024), perm.PrivateFile))
+ require.NoError(t, os.WriteFile(filepath.Join(repoPath, "packed-refs"), incompressibleData(7*1024), perm.PrivateFile))
requireRepositorySize(t, ctx, client, repo, 23)
// Even garbage should increase the size.
- require.NoError(t, os.WriteFile(filepath.Join(repoPath, "garbage"), uncompressibleData(5*1024), perm.PrivateFile))
+ require.NoError(t, os.WriteFile(filepath.Join(repoPath, "garbage"), incompressibleData(5*1024), perm.PrivateFile))
requireRepositorySize(t, ctx, client, repo, 28)
}
@@ -169,7 +169,7 @@ func TestGetObjectDirectorySize_successful(t *testing.T) {
requireObjectDirectorySize(t, ctx, client, repo, 0)
// Writing an object into the repository should increase the size accordingly.
- gittest.WriteBlob(t, cfg, repoPath, uncompressibleData(16*1024))
+ gittest.WriteBlob(t, cfg, repoPath, incompressibleData(16*1024))
requireObjectDirectorySize(t, ctx, client, repo, 16)
}
@@ -184,7 +184,7 @@ func TestGetObjectDirectorySize_quarantine(t *testing.T) {
t.Run("quarantined repo", func(t *testing.T) {
repo, repoPath := gittest.CreateRepository(t, ctx, cfg)
repo.GitObjectDirectory = "objects/"
- gittest.WriteBlob(t, cfg, repoPath, uncompressibleData(16*1024))
+ gittest.WriteBlob(t, cfg, repoPath, incompressibleData(16*1024))
// Rails sends the repository's relative path from the access checks as provided by Gitaly. If transactions are enabled,
// this is the snapshot's relative path. Include the metadata in the test as well as we're testing requests with quarantine
@@ -274,10 +274,10 @@ func requireObjectDirectorySize(tb testing.TB, ctx context.Context, client gital
require.Equal(tb, expectedSize, response.GetSize())
}
-// uncompressibleData returns data that will not be easily compressible by Git. This is required because
+// incompressibleData returns data that will not be easily compressible by Git. This is required because
// well-compressible objects would not lead to a repository size increase due to the zlib compression used for Git
// objects.
-func uncompressibleData(bytes int) []byte {
+func incompressibleData(bytes int) []byte {
data := make([]byte, bytes)
_, _ = rand.Read(data[:])
return data
diff --git a/internal/gitaly/storage/metadata_test.go b/internal/gitaly/storage/metadata_test.go
index 78b0f5ff9..fd7beefcf 100644
--- a/internal/gitaly/storage/metadata_test.go
+++ b/internal/gitaly/storage/metadata_test.go
@@ -22,7 +22,7 @@ func readFilesystemID(t *testing.T, path string) string {
return metadata["gitaly_filesystem_id"]
}
-func TestWriteMetdataFile(t *testing.T) {
+func TestWriteMetadataFile(t *testing.T) {
tempDir := testhelper.TempDir(t)
require.NoError(t, WriteMetadataFile(tempDir))
diff --git a/internal/gitaly/storage/storagemgr/partition_manager.go b/internal/gitaly/storage/storagemgr/partition_manager.go
index 045da1d0a..ad36f4f5e 100644
--- a/internal/gitaly/storage/storagemgr/partition_manager.go
+++ b/internal/gitaly/storage/storagemgr/partition_manager.go
@@ -178,7 +178,7 @@ func (sm *storageManager) newFinalizableTransaction(ptn *partition, tx *Transact
type partition struct {
// closing is closed when the partition has no longer any active transactions.
closing chan struct{}
- // transactionManagerClosed is closed to signal when the partition's TranscationManager.Run has returned.
+ // transactionManagerClosed is closed to signal when the partition's TransactionManager.Run has returned.
// Clients stumbling on the partition when it is closing wait on this channel to know when the previous
// TransactionManager has closed and it is safe to start another one.
transactionManagerClosed chan struct{}
diff --git a/internal/gitaly/storage/storagemgr/transaction_manager.go b/internal/gitaly/storage/storagemgr/transaction_manager.go
index 59dce61cd..bd7653a04 100644
--- a/internal/gitaly/storage/storagemgr/transaction_manager.go
+++ b/internal/gitaly/storage/storagemgr/transaction_manager.go
@@ -200,7 +200,7 @@ type Transaction struct {
// Transaction queues in admissionQueue to be committed, and is considered admitted once it has
// been dequeued by TransactionManager.Run(). Once the transaction is admitted, its ownership moves
// from the client goroutine to the TransactionManager.Run() goroutine, and the client goroutine must
- // not do any modifications to the state of the transcation anymore to avoid races.
+ // not do any modifications to the state of the transaction anymore to avoid races.
admitted bool
// finish cleans up the transaction releasing the resources associated with it. It must be called
// once the transaction is done with.
@@ -1417,7 +1417,7 @@ func (mgr *TransactionManager) isClosing() bool {
}
}
-// initialize initializes the TransactionManager's state from the database. It loads the appendend and the applied
+// initialize initializes the TransactionManager's state from the database. It loads the appended and the applied
// LSNs and initializes the notification channels that synchronize transaction beginning with log entry applying.
func (mgr *TransactionManager) initialize(ctx context.Context) error {
defer close(mgr.initialized)
@@ -1444,7 +1444,7 @@ func (mgr *TransactionManager) initialize(ctx context.Context) error {
mgr.appendedLSN = mgr.appliedLSN
- // The iterator seeks to a key that is greater than or equal than seeked key. Since we are doing a reverse
+ // The iterator seeks to a key that is greater than or equal than sought key. Since we are doing a reverse
// seek, we need to add 0xff to the prefix so the first iterated key is the latest log entry.
if iterator.Seek(append(logPrefix, 0xff)); iterator.Valid() {
mgr.appendedLSN = LSN(binary.BigEndian.Uint64(bytes.TrimPrefix(iterator.Item().Key(), logPrefix)))
@@ -1785,7 +1785,7 @@ func (mgr *TransactionManager) verifyReferencesWithGit(ctx context.Context, refe
return nil
}
-// verifyDefaultBranchUpdate verifies the default branch referance update. This is done by first checking if it is one of
+// verifyDefaultBranchUpdate verifies the default branch reference update. This is done by first checking if it is one of
// the references in the current transaction which is not scheduled to be deleted. If not, we check if its a valid reference
// name in the repository. We don't do reference name validation because any reference going through the transaction manager
// has name validation and we can rely on that.
diff --git a/internal/gitaly/storage/storagemgr/transaction_manager_hook_test.go b/internal/gitaly/storage/storagemgr/transaction_manager_hook_test.go
index c21df6497..63679547c 100644
--- a/internal/gitaly/storage/storagemgr/transaction_manager_hook_test.go
+++ b/internal/gitaly/storage/storagemgr/transaction_manager_hook_test.go
@@ -18,7 +18,7 @@ import (
// influence the execution of the test.
type hookFunc func(hookContext)
-// hookContext are the control toggels available in a hook.
+// hookContext are the control toggles available in a hook.
type hookContext struct {
// closeManager calls the calls Close on the TransactionManager.
closeManager func()
@@ -28,7 +28,7 @@ type hookContext struct {
}
// hooks are functions that get invoked at specific points of the TransactionManager Run method. They allow
-// for hooking into the Run method at specific poins which would otherwise to do assertions that would otherwise
+// for hooking into the Run method at specific points which would otherwise to do assertions that would otherwise
// not be possible.
type hooks struct {
// beforeReadLogEntry is invoked before a log entry is read from the database.
diff --git a/internal/grpc/client/dial.go b/internal/grpc/client/dial.go
index a4f076c3a..b87eba079 100644
--- a/internal/grpc/client/dial.go
+++ b/internal/grpc/client/dial.go
@@ -156,7 +156,7 @@ func Dial(ctx context.Context, rawAddress string, opts ...DialOption) (*grpc.Cli
} else {
certPool, err := gitalyx509.SystemCertPool()
if err != nil {
- return nil, fmt.Errorf("failed to get system certificat pool for 'tls' connection: %w", err)
+ return nil, fmt.Errorf("failed to get system certificate pool for 'tls' connection: %w", err)
}
transportCredentials = credentials.NewTLS(&tls.Config{
diff --git a/internal/grpc/middleware/limithandler/middleware.go b/internal/grpc/middleware/limithandler/middleware.go
index 7ea9064e9..24993d40e 100644
--- a/internal/grpc/middleware/limithandler/middleware.go
+++ b/internal/grpc/middleware/limithandler/middleware.go
@@ -35,7 +35,7 @@ type LimiterMiddleware struct {
}
// New creates a new middleware that limits requests. SetupFunc sets up the
-// middlware with a specific kind of limiter.
+// middleware with a specific kind of limiter.
func New(cfg config.Cfg, getLockKey GetLockKey, setupMiddleware SetupFunc) *LimiterMiddleware {
middleware := &LimiterMiddleware{
getLockKey: getLockKey,
diff --git a/internal/grpc/middleware/sentryhandler/sentryhandler_test.go b/internal/grpc/middleware/sentryhandler/sentryhandler_test.go
index 1edbd4033..12e8f5a31 100644
--- a/internal/grpc/middleware/sentryhandler/sentryhandler_test.go
+++ b/internal/grpc/middleware/sentryhandler/sentryhandler_test.go
@@ -105,7 +105,7 @@ func TestGenerateSentryEvent(t *testing.T) {
expectedEvent: nil,
},
{
- desc: "DeadlineExceeded erorr is ignored",
+ desc: "DeadlineExceeded error is ignored",
method: "/gitaly.RepoService/RepoExists",
err: status.Errorf(codes.DeadlineExceeded, "Something failed"),
expectedEvent: nil,
diff --git a/internal/grpc/proxy/peeker.go b/internal/grpc/proxy/peeker.go
index 6825d7f37..645c4d618 100644
--- a/internal/grpc/proxy/peeker.go
+++ b/internal/grpc/proxy/peeker.go
@@ -32,7 +32,7 @@ func newPeeker(stream grpc.ServerStream) *peeker {
}
// ErrInvalidPeekCount indicates the director function requested an invalid
-// peek quanity
+// peek quantity
var ErrInvalidPeekCount = errors.New("peek count must be greater than zero")
func (p peeker) Peek() ([]byte, error) {
diff --git a/internal/grpc/sidechannel/sidechannel_test.go b/internal/grpc/sidechannel/sidechannel_test.go
index 14a49afa6..ea096f9da 100644
--- a/internal/grpc/sidechannel/sidechannel_test.go
+++ b/internal/grpc/sidechannel/sidechannel_test.go
@@ -185,7 +185,7 @@ func call(ctx context.Context, conn *grpc.ClientConn, registry *Registry, handle
ctxOut, waiter := RegisterSidechannel(ctx, registry, handler)
defer func() {
- // We aleady check the error further down.
+ // We already check the error further down.
_ = waiter.Close()
}()
diff --git a/internal/helper/env/env.go b/internal/helper/env/env.go
index 92173d335..f8efa6bab 100644
--- a/internal/helper/env/env.go
+++ b/internal/helper/env/env.go
@@ -67,7 +67,7 @@ func GetString(name string, fallback string) string {
}
// ExtractValue returns the value of the environment variable with the given key. The given key
-// should not have a trailing "=". If the same key occurrs multiple times in the environment, then
+// should not have a trailing "=". If the same key occurs multiple times in the environment, then
// any later occurrences will override previous ones.
func ExtractValue(environment []string, key string) string {
var value string
diff --git a/internal/helper/text/random.go b/internal/helper/text/random.go
index 5b9f9a714..3f5641660 100644
--- a/internal/helper/text/random.go
+++ b/internal/helper/text/random.go
@@ -6,7 +6,7 @@ import (
"io"
)
-// RandomHex returns an n-byte hexademical random string.
+// RandomHex returns an n-byte hexadecimal random string.
func RandomHex(n int) (string, error) {
buf := make([]byte, n)
if _, err := io.ReadFull(rand.Reader, buf); err != nil {
diff --git a/internal/limiter/resizable_semaphore_test.go b/internal/limiter/resizable_semaphore_test.go
index 6c0e47df5..86921de6a 100644
--- a/internal/limiter/resizable_semaphore_test.go
+++ b/internal/limiter/resizable_semaphore_test.go
@@ -107,7 +107,7 @@ func testResizableSemaphoreCanceledWhenNotFull(t *testing.T, ctx context.Context
func testResizableSemaphoreCanceledWhenFull(t *testing.T, ctx context.Context, stopContext context.CancelFunc, expectedErr error) {
semaphore := NewResizableSemaphore(5)
- // Try to acquire a token of the empty sempahore
+ // Try to acquire a token of the empty semaphore
require.Nil(t, semaphore.TryAcquire())
semaphore.Release()
@@ -129,7 +129,7 @@ func testResizableSemaphoreCanceledWhenFull(t *testing.T, ctx context.Context, s
}
acquireWg1.Wait()
- // Another 5 waits for sempahore
+ // Another 5 waits for semaphore
var acquireWg2 sync.WaitGroup
for i := 0; i < 5; i++ {
acquireWg2.Add(1)
diff --git a/internal/log/configure.go b/internal/log/configure.go
index da3eda3aa..231bb7541 100644
--- a/internal/log/configure.go
+++ b/internal/log/configure.go
@@ -42,7 +42,7 @@ func Configure(out io.Writer, format string, level string, hooks ...logrus.Hook)
}
if !SkipReplacingGlobalLoggers {
- // Replace the logrus standar logger. While we shouldn't ever be using it in our own codebase, there
+ // Replace the logrus standard logger. While we shouldn't ever be using it in our own codebase, there
// will very likely be cases where dependencies use it.
//
//nolint:forbidigo
diff --git a/internal/praefect/assignment.go b/internal/praefect/assignment.go
index 1aa6447ad..c2c9b19c0 100644
--- a/internal/praefect/assignment.go
+++ b/internal/praefect/assignment.go
@@ -22,7 +22,7 @@ func NewDisabledAssignmentStore(storages map[string][]string) AssignmentStore {
return disabledAssignments(storages)
}
-// GetHostAssigments simply returns all of the storages configured for the virtual storage.
+// GetHostAssignments simply returns all of the storages configured for the virtual storage.
func (storages disabledAssignments) GetHostAssignments(ctx context.Context, virtualStorage string, repositoryID int64) ([]string, error) {
return storages[virtualStorage], nil
}
diff --git a/internal/praefect/coordinator.go b/internal/praefect/coordinator.go
index 7ada12e4a..03f9e0df2 100644
--- a/internal/praefect/coordinator.go
+++ b/internal/praefect/coordinator.go
@@ -618,7 +618,7 @@ func streamParametersContext(ctx context.Context) context.Context {
// world view of which features are enabled and which ones aren't and ideally do the same
// thing.
//
- // This problem isn't solveable on Gitaly side, but Praefect is in a perfect position to do
+ // This problem isn't solvable on Gitaly side, but Praefect is in a perfect position to do
// so. While it may have the same problem in a load-balanced multi-Praefect setup, this is
// much less of a problem: the most important thing is that the view on feature flags is
// consistent for a single RPC call, and that will always be the case regardless of which
@@ -1141,7 +1141,7 @@ func (c *Coordinator) newRequestFinalizer(
}
// The cancellation signal is suppressed earlier in the function, so we'd return no error if the
- // orignal context exceeded its deadline while running the request finalizer. If there were
+ // original context exceeded its deadline while running the request finalizer. If there were
// no other errors, return the possible error from the context so we don't return OK code for
// failed requests.
return originalCtx.Err()
diff --git a/internal/praefect/nodes/per_repository.go b/internal/praefect/nodes/per_repository.go
index 0b1682f73..a07946303 100644
--- a/internal/praefect/nodes/per_repository.go
+++ b/internal/praefect/nodes/per_repository.go
@@ -50,7 +50,7 @@ func (pr *PerRepositoryElector) GetPrimary(ctx context.Context, virtualStorage s
// 1. `election`, as this indicates this transaction re-elected the primary and the CTE now contains the most
// recent change
// 2. `reread`, as this indicates a concurrent transaction had potentially changed the primary.
- // 3. `snapshot`, if the current primary was valid in the transcation's database snapshot.
+ // 3. `snapshot`, if the current primary was valid in the transaction's database snapshot.
var current, previous sql.NullString
if err := pr.db.QueryRowContext(ctx, `
WITH reread AS (
diff --git a/internal/praefect/reconciler/reconciler_test.go b/internal/praefect/reconciler/reconciler_test.go
index 230447d88..10b06b709 100644
--- a/internal/praefect/reconciler/reconciler_test.go
+++ b/internal/praefect/reconciler/reconciler_test.go
@@ -1055,16 +1055,16 @@ func TestReconciler(t *testing.T) {
t.Helper()
runCtx, cancelRun := context.WithCancel(ctx)
- var stopped, resetted bool
+ var stopped, reset bool
ticker := helper.NewManualTicker()
ticker.StopFunc = func() { stopped = true }
ticker.ResetFunc = func() {
- if resetted {
+ if reset {
cancelRun()
return
}
- resetted = true
+ reset = true
ticker.Tick()
}
@@ -1079,7 +1079,7 @@ func TestReconciler(t *testing.T) {
require.Equal(t, context.Canceled, reconciler.Run(runCtx, ticker))
require.True(t, stopped)
- require.True(t, resetted)
+ require.True(t, reset)
}
for vs, repos := range tc.deletedRepositories {
diff --git a/internal/praefect/replicator_test.go b/internal/praefect/replicator_test.go
index 68ba3f314..c81341012 100644
--- a/internal/praefect/replicator_test.go
+++ b/internal/praefect/replicator_test.go
@@ -847,7 +847,7 @@ func TestProcessBacklog_ReplicatesToReadOnlyPrimary(t *testing.T) {
ctx, cancel := context.WithCancel(testhelper.Context(t))
defer cancel()
- const virtualStorage = "virtal-storage"
+ const virtualStorage = "virtual-storage"
const primaryStorage = "storage-1"
const secondaryStorage = "storage-2"
const repositoryID = 1
diff --git a/internal/praefect/repocleaner/repository_test.go b/internal/praefect/repocleaner/repository_test.go
index 94501ea6c..3d45a27c3 100644
--- a/internal/praefect/repocleaner/repository_test.go
+++ b/internal/praefect/repocleaner/repository_test.go
@@ -163,13 +163,13 @@ func TestRunner_Run(t *testing.T) {
var iteration int32
runner := NewRunner(cfg, logger, praefect.StaticHealthChecker{virtualStorage: []string{storage1, storage2, storage3}}, nodeSet.Connections(), storageCleanup, storageCleanup, actionStub{
- PerformMethod: func(ctx context.Context, argVirtualStoage, argStorage string, notExisting []string) error {
+ PerformMethod: func(ctx context.Context, argVirtualStorage, argStorage string, notExisting []string) error {
// There should be three iterations, as each storage has
// one repository that is unused by praefect.
atomic.AddInt32(&iteration, 1)
i := atomic.LoadInt32(&iteration)
- assert.Equal(t, virtualStorage, argVirtualStoage)
+ assert.Equal(t, virtualStorage, argVirtualStorage)
assert.Equal(t, []string{"repo-4.git"}, notExisting)
if i == 3 {
diff --git a/internal/praefect/server.go b/internal/praefect/server.go
index c52b160f5..af4c74f0f 100644
--- a/internal/praefect/server.go
+++ b/internal/praefect/server.go
@@ -105,7 +105,7 @@ func WithStreamInterceptor(interceptor grpc.StreamServerInterceptor) ServerOptio
}
}
-// NewGRPCServer returns gRPC server wuth registered proxy-handler and actual services praefect serves on its own.
+// NewGRPCServer returns gRPC server with registered proxy-handler and actual services praefect serves on its own.
// It includes a set of unary and stream interceptors required to add logging, authentication, etc.
func NewGRPCServer(
deps *Dependencies,
diff --git a/internal/safe/file_writer.go b/internal/safe/file_writer.go
index 76ab0bcc2..bf18a440f 100644
--- a/internal/safe/file_writer.go
+++ b/internal/safe/file_writer.go
@@ -65,7 +65,7 @@ func (fw *FileWriter) Write(p []byte) (n int, err error) {
// Commit will close the temporary file and rename it to the target file name
// the first call to Commit() will close and delete the temporary file, so
-// subsequently calls to Commit() are gauaranteed to return an error.
+// subsequently calls to Commit() are guaranteed to return an error.
func (fw *FileWriter) Commit() error {
err := ErrAlreadyDone
diff --git a/internal/streamcache/cache.go b/internal/streamcache/cache.go
index ad365c2f6..094dfec93 100644
--- a/internal/streamcache/cache.go
+++ b/internal/streamcache/cache.go
@@ -298,7 +298,7 @@ func (c *cache) newEntry(key string, create func(io.Writer) error) (_ io.ReadClo
// Every entry gets a unique underlying file. We do not want to reuse
// existing cache files because we do not know whether they are the
- // result of a succesfull call to create.
+ // result of a successful call to create.
//
// This may sound like we should be using an anonymous tempfile, but that
// would be at odds with the requirement to be able to open and close
diff --git a/internal/streamcache/min_occurences.go b/internal/streamcache/min_occurrences.go
index d48e37e95..d48e37e95 100644
--- a/internal/streamcache/min_occurences.go
+++ b/internal/streamcache/min_occurrences.go
diff --git a/internal/testhelper/directory.go b/internal/testhelper/directory.go
index 58d540d51..f66862c76 100644
--- a/internal/testhelper/directory.go
+++ b/internal/testhelper/directory.go
@@ -49,7 +49,7 @@ func RequireDirectoryState(tb testing.TB, rootDirectory, relativeDirectory strin
trimmedPath := strings.TrimPrefix(path, rootDirectory)
if trimmedPath == "" {
// Store the walked directory itself as "/". Less confusing than having it be
- // an emptry string.
+ // an empty string.
trimmedPath = string(os.PathSeparator)
}
diff --git a/internal/transaction/txinfo/transaction.go b/internal/transaction/txinfo/transaction.go
index 3f21bbd92..a198b2abe 100644
--- a/internal/transaction/txinfo/transaction.go
+++ b/internal/transaction/txinfo/transaction.go
@@ -60,9 +60,9 @@ func transactionFromSerialized(serialized string) (Transaction, error) {
}
// InjectTransaction injects reference transaction metadata into an incoming context
-func InjectTransaction(ctx context.Context, tranasctionID uint64, node string, primary bool) (context.Context, error) {
+func InjectTransaction(ctx context.Context, transactionID uint64, node string, primary bool) (context.Context, error) {
transaction := Transaction{
- ID: tranasctionID,
+ ID: transactionID,
Node: node,
Primary: primary,
}
diff --git a/proto/blob.proto b/proto/blob.proto
index 73a78670b..ddbf1182a 100644
--- a/proto/blob.proto
+++ b/proto/blob.proto
@@ -159,7 +159,7 @@ message ListBlobsRequest {
// dash. Please consult gitrevisions(7) for more info. Must not be empty.
repeated string revisions = 2;
// limit is the maximum number of blobs to return. If set to its default
- // (`0`), then all found blobs wll be returned.
+ // (`0`), then all found blobs will be returned.
uint32 limit = 3;
// bytes_limit is the maximum number of bytes to receive for each blob. If set
// to `0`, then no blob data will be sent. If `-1`, then all blob data will
@@ -202,7 +202,7 @@ message ListAllBlobsRequest {
// repository is the repository in which blobs should be enumerated.
Repository repository = 1 [(target_repository)=true];
// limit is the maximum number of blobs to return. If set to its default
- // (`0`), then all found blobs wll be returned.
+ // (`0`), then all found blobs will be returned.
uint32 limit = 2;
// bytes_limit is the maximum number of bytes to receive for each blob. If set
// to `0`, then no blob data will be sent. If `-1`, then all blob data will
diff --git a/proto/commit.proto b/proto/commit.proto
index 3815ab52e..a19376bbb 100644
--- a/proto/commit.proto
+++ b/proto/commit.proto
@@ -197,7 +197,7 @@ service CommitService {
// ListCommitsRequest is a request for the ListCommits RPC.
message ListCommitsRequest {
- // Order is the order in which commits shoud be traversed.
+ // Order is the order in which commits should be traversed.
enum Order {
// NONE defaults to reverse chronological order.
NONE = 0; // protolint:disable:this ENUM_FIELD_NAMES_PREFIX ENUM_FIELD_NAMES_ZERO_VALUE_END_WITH
@@ -308,7 +308,7 @@ message CommitStatsResponse {
// CommitIsAncestorRequest is the request for the CommitIsAncestor RPC.
message CommitIsAncestorRequest {
- // repository is the repository for which we need to check the ancestory.
+ // repository is the repository for which we need to check the ancestry.
Repository repository = 1 [(target_repository)=true];
// ancestor_id is the object ID of the commit which needs to be checked as ancestor.
string ancestor_id = 2;
@@ -577,7 +577,7 @@ message ListCommitsByRefNameResponse {
// FindAllCommitsRequest is the request for the FindAllCommits RPC.
message FindAllCommitsRequest {
- // Order is the order in which commits shoud be traversed.
+ // Order is the order in which commits should be traversed.
enum Order {
// NONE denotes the default ordering where the commits are shown in
// reverse chronological order.
@@ -616,7 +616,7 @@ message FindAllCommitsResponse {
// FindCommitsRequest is the request for the FindCommits RPC.
message FindCommitsRequest {
- // Order is the order in which commits shoud be traversed.
+ // Order is the order in which commits should be traversed.
enum Order {
// NONE defaults to reverse chronological order.
NONE = 0; // protolint:disable:this ENUM_FIELD_NAMES_PREFIX ENUM_FIELD_NAMES_ZERO_VALUE_END_WITH
@@ -878,7 +878,7 @@ message GetCommitSignaturesRequest {
Repository repository = 1 [(target_repository)=true];
// commit_ids is the list of commitish object IDs for whom we want to retrieve
// signature information. If a commit doesn't have associated signature information
- // it will be ommitted from the results.
+ // it will be omitted from the results.
repeated string commit_ids = 2;
}
diff --git a/proto/diff.proto b/proto/diff.proto
index d140db71c..b2a2ef6e5 100644
--- a/proto/diff.proto
+++ b/proto/diff.proto
@@ -20,7 +20,7 @@ service DiffService {
}
// CommitDelta returns the deltas between two different commits. A delta
- // includes everthing that changed about a set of paths except for the actual
+ // includes everything that changed about a set of paths except for the actual
// diff.
rpc CommitDelta(CommitDeltaRequest) returns (stream CommitDeltaResponse) {
option (op_type) = {
@@ -252,7 +252,7 @@ message RawPatchRequest {
string right_commit_id = 3;
}
-// RawPatchResponse is a reponse for the RawPatch RPC.
+// RawPatchResponse is a response for the RawPatch RPC.
message RawPatchResponse {
// data is a sequence of bytes representing the unmodified diff patch data
// returned from git-format-patch(1).
diff --git a/proto/errors.proto b/proto/errors.proto
index 9ce8a52e5..68f49ba93 100644
--- a/proto/errors.proto
+++ b/proto/errors.proto
@@ -29,7 +29,7 @@ message IndexError {
// ERROR_TYPE_EMPTY_PATH indicates an empty path was provided by the caller.
ERROR_TYPE_EMPTY_PATH = 1;
// ERROR_TYPE_INVALID_PATH indicates a path either contained '.git', or was
- // incorrectly formated, e.g. invalid://file/path.
+ // incorrectly formatted, e.g. invalid://file/path.
ERROR_TYPE_INVALID_PATH = 2;
// ERROR_TYPE_DIRECTORY_EXISTS indicates the directory being created already exists.
ERROR_TYPE_DIRECTORY_EXISTS = 3;
@@ -98,7 +98,7 @@ message ReferenceExistsError {
string oid = 2;
}
-// ReferenceNotFoundError is an error retruned when a reference that ought to exist does not exist.
+// ReferenceNotFoundError is an error returned when a reference that ought to exist does not exist.
message ReferenceNotFoundError {
// reference_name is the name of the reference that does not exist.
bytes reference_name = 1;
diff --git a/proto/go/gitalypb/blob.pb.go b/proto/go/gitalypb/blob.pb.go
index 58ad78679..a1e1f86f4 100644
--- a/proto/go/gitalypb/blob.pb.go
+++ b/proto/go/gitalypb/blob.pb.go
@@ -358,7 +358,7 @@ type ListBlobsRequest struct {
// dash. Please consult gitrevisions(7) for more info. Must not be empty.
Revisions []string `protobuf:"bytes,2,rep,name=revisions,proto3" json:"revisions,omitempty"`
// limit is the maximum number of blobs to return. If set to its default
- // (`0`), then all found blobs wll be returned.
+ // (`0`), then all found blobs will be returned.
Limit uint32 `protobuf:"varint,3,opt,name=limit,proto3" json:"limit,omitempty"`
// bytes_limit is the maximum number of bytes to receive for each blob. If set
// to `0`, then no blob data will be sent. If `-1`, then all blob data will
@@ -499,7 +499,7 @@ type ListAllBlobsRequest struct {
// repository is the repository in which blobs should be enumerated.
Repository *Repository `protobuf:"bytes,1,opt,name=repository,proto3" json:"repository,omitempty"`
// limit is the maximum number of blobs to return. If set to its default
- // (`0`), then all found blobs wll be returned.
+ // (`0`), then all found blobs will be returned.
Limit uint32 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"`
// bytes_limit is the maximum number of bytes to receive for each blob. If set
// to `0`, then no blob data will be sent. If `-1`, then all blob data will
diff --git a/proto/go/gitalypb/commit.pb.go b/proto/go/gitalypb/commit.pb.go
index cc3588eaa..f2d70205b 100644
--- a/proto/go/gitalypb/commit.pb.go
+++ b/proto/go/gitalypb/commit.pb.go
@@ -21,7 +21,7 @@ const (
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
-// Order is the order in which commits shoud be traversed.
+// Order is the order in which commits should be traversed.
type ListCommitsRequest_Order int32
const (
@@ -239,7 +239,7 @@ func (GetTreeEntriesRequest_SortBy) EnumDescriptor() ([]byte, []int) {
return file_commit_proto_rawDescGZIP(), []int{15, 0}
}
-// Order is the order in which commits shoud be traversed.
+// Order is the order in which commits should be traversed.
type FindAllCommitsRequest_Order int32
const (
@@ -297,7 +297,7 @@ func (FindAllCommitsRequest_Order) EnumDescriptor() ([]byte, []int) {
return file_commit_proto_rawDescGZIP(), []int{26, 0}
}
-// Order is the order in which commits shoud be traversed.
+// Order is the order in which commits should be traversed.
type FindCommitsRequest_Order int32
const (
@@ -860,7 +860,7 @@ type CommitIsAncestorRequest struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
- // repository is the repository for which we need to check the ancestory.
+ // repository is the repository for which we need to check the ancestry.
Repository *Repository `protobuf:"bytes,1,opt,name=repository,proto3" json:"repository,omitempty"`
// ancestor_id is the object ID of the commit which needs to be checked as ancestor.
AncestorId string `protobuf:"bytes,2,opt,name=ancestor_id,json=ancestorId,proto3" json:"ancestor_id,omitempty"`
@@ -3631,7 +3631,7 @@ type GetCommitSignaturesRequest struct {
Repository *Repository `protobuf:"bytes,1,opt,name=repository,proto3" json:"repository,omitempty"`
// commit_ids is the list of commitish object IDs for whom we want to retrieve
// signature information. If a commit doesn't have associated signature information
- // it will be ommitted from the results.
+ // it will be omitted from the results.
CommitIds []string `protobuf:"bytes,2,rep,name=commit_ids,json=commitIds,proto3" json:"commit_ids,omitempty"`
}
diff --git a/proto/go/gitalypb/diff.pb.go b/proto/go/gitalypb/diff.pb.go
index c34c019eb..4dac6e443 100644
--- a/proto/go/gitalypb/diff.pb.go
+++ b/proto/go/gitalypb/diff.pb.go
@@ -1008,7 +1008,7 @@ func (x *RawPatchRequest) GetRightCommitId() string {
return ""
}
-// RawPatchResponse is a reponse for the RawPatch RPC.
+// RawPatchResponse is a response for the RawPatch RPC.
type RawPatchResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
diff --git a/proto/go/gitalypb/diff_grpc.pb.go b/proto/go/gitalypb/diff_grpc.pb.go
index a16c0e63e..89f3848d2 100644
--- a/proto/go/gitalypb/diff_grpc.pb.go
+++ b/proto/go/gitalypb/diff_grpc.pb.go
@@ -26,7 +26,7 @@ type DiffServiceClient interface {
// chunked across messages and get streamed back to the client.
CommitDiff(ctx context.Context, in *CommitDiffRequest, opts ...grpc.CallOption) (DiffService_CommitDiffClient, error)
// CommitDelta returns the deltas between two different commits. A delta
- // includes everthing that changed about a set of paths except for the actual
+ // includes everything that changed about a set of paths except for the actual
// diff.
CommitDelta(ctx context.Context, in *CommitDeltaRequest, opts ...grpc.CallOption) (DiffService_CommitDeltaClient, error)
// RawDiff returns a diff between two commits. The output is the unmodified
@@ -266,7 +266,7 @@ type DiffServiceServer interface {
// chunked across messages and get streamed back to the client.
CommitDiff(*CommitDiffRequest, DiffService_CommitDiffServer) error
// CommitDelta returns the deltas between two different commits. A delta
- // includes everthing that changed about a set of paths except for the actual
+ // includes everything that changed about a set of paths except for the actual
// diff.
CommitDelta(*CommitDeltaRequest, DiffService_CommitDeltaServer) error
// RawDiff returns a diff between two commits. The output is the unmodified
diff --git a/proto/go/gitalypb/errors.pb.go b/proto/go/gitalypb/errors.pb.go
index da4ccc880..5f0baa793 100644
--- a/proto/go/gitalypb/errors.pb.go
+++ b/proto/go/gitalypb/errors.pb.go
@@ -30,7 +30,7 @@ const (
// ERROR_TYPE_EMPTY_PATH indicates an empty path was provided by the caller.
IndexError_ERROR_TYPE_EMPTY_PATH IndexError_ErrorType = 1
// ERROR_TYPE_INVALID_PATH indicates a path either contained '.git', or was
- // incorrectly formated, e.g. invalid://file/path.
+ // incorrectly formatted, e.g. invalid://file/path.
IndexError_ERROR_TYPE_INVALID_PATH IndexError_ErrorType = 2
// ERROR_TYPE_DIRECTORY_EXISTS indicates the directory being created already exists.
IndexError_ERROR_TYPE_DIRECTORY_EXISTS IndexError_ErrorType = 3
@@ -678,7 +678,7 @@ func (x *ReferenceExistsError) GetOid() string {
return ""
}
-// ReferenceNotFoundError is an error retruned when a reference that ought to exist does not exist.
+// ReferenceNotFoundError is an error returned when a reference that ought to exist does not exist.
type ReferenceNotFoundError struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
diff --git a/proto/go/gitalypb/remote.pb.go b/proto/go/gitalypb/remote.pb.go
index 612b4d5cb..f8999771c 100644
--- a/proto/go/gitalypb/remote.pb.go
+++ b/proto/go/gitalypb/remote.pb.go
@@ -33,7 +33,7 @@ type UpdateRemoteMirrorRequest struct {
// on-disk remote configuration.
Remote *UpdateRemoteMirrorRequest_Remote `protobuf:"bytes,7,opt,name=remote,proto3" json:"remote,omitempty"`
// only_branches_matching contains patterns to match branches against. Only the
- // matched brances are updated in the remote mirror. If no patterns are
+ // matched branches are updated in the remote mirror. If no patterns are
// specified, all branches are updated. The patterns should only contain the
// branch name without the 'refs/heads/' prefix. "*" can be used as a
// wildcard to match anything. only_branches_matching can be streamed to the
diff --git a/proto/remote.proto b/proto/remote.proto
index 110d7f058..055cac046 100644
--- a/proto/remote.proto
+++ b/proto/remote.proto
@@ -73,7 +73,7 @@ message UpdateRemoteMirrorRequest {
// on-disk remote configuration.
Remote remote = 7;
// only_branches_matching contains patterns to match branches against. Only the
- // matched brances are updated in the remote mirror. If no patterns are
+ // matched branches are updated in the remote mirror. If no patterns are
// specified, all branches are updated. The patterns should only contain the
// branch name without the 'refs/heads/' prefix. "*" can be used as a
// wildcard to match anything. only_branches_matching can be streamed to the