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:
authorjohn.mcdonnell <jmcdonnell@gitlab.com>2022-07-26 06:32:03 +0300
committerjohn.mcdonnell <jmcdonnell@gitlab.com>2022-07-26 06:32:03 +0300
commit53e390a5a40f0732015603f7bb5966225f184107 (patch)
tree589faa790d4bd4b614431569acc5c2bf985e354f
parenta77b5898ab180488b84eae8447c260a63d4bbcf8 (diff)
Fix a typo in UserSquashRequest Author email error msgjmd-fixing-typos-grammar
-rw-r--r--internal/gitaly/service/operations/squash.go2
-rw-r--r--internal/gitaly/service/operations/squash_test.go12
2 files changed, 13 insertions, 1 deletions
diff --git a/internal/gitaly/service/operations/squash.go b/internal/gitaly/service/operations/squash.go
index ccc875628..7f2bc0881 100644
--- a/internal/gitaly/service/operations/squash.go
+++ b/internal/gitaly/service/operations/squash.go
@@ -70,7 +70,7 @@ func validateUserSquashRequest(req *gitalypb.UserSquashRequest) error {
}
if len(req.GetAuthor().GetEmail()) == 0 {
- return errors.New("empty auithor email")
+ return errors.New("empty author email")
}
return nil
diff --git a/internal/gitaly/service/operations/squash_test.go b/internal/gitaly/service/operations/squash_test.go
index f79af65dd..ae063e9a4 100644
--- a/internal/gitaly/service/operations/squash_test.go
+++ b/internal/gitaly/service/operations/squash_test.go
@@ -774,6 +774,18 @@ func TestUserSquash_gitError(t *testing.T) {
},
expectedErr: helper.ErrInvalidArgumentf("UserSquash: empty author name"),
},
+ {
+ desc: "author has no email set",
+ request: &gitalypb.UserSquashRequest{
+ Repository: repo,
+ User: gittest.TestUser,
+ Author: &gitalypb.User{Name: gittest.TestUser.Name},
+ CommitMessage: commitMessage,
+ StartSha: startSha,
+ EndSha: endSha,
+ },
+ expectedErr: helper.ErrInvalidArgumentf("UserSquash: empty author email"),
+ },
}
for _, tc := range testCases {