]> source.dussan.org Git - gitea.git/commitdiff
Fix spelling errors in comments.
authorJoseph Crail <jbcrail@gmail.com>
Sun, 7 Dec 2014 01:22:48 +0000 (20:22 -0500)
committerJoseph Crail <jbcrail@gmail.com>
Sun, 7 Dec 2014 01:22:48 +0000 (20:22 -0500)
17 files changed:
models/action.go
models/login.go
models/models.go
models/oauth2.go
models/org.go
models/repo.go
models/user.go
models/webhook.go
modules/auth/auth.go
modules/auth/ldap/ldap.go
modules/avatar/avatar.go
modules/ldap/debug.go
modules/log/log.go
modules/mahonia/charset.go
modules/middleware/repo.go
modules/setting/setting.go
routers/repo/issue.go

index 269fd753e877f0b525535fd51864332c961d35b5..98a4f5a0858b8df5532e7926216ae9bed8ce077b 100644 (file)
@@ -349,7 +349,7 @@ func NewRepoAction(u *User, repo *Repository) (err error) {
        return err
 }
 
-// TransferRepoAction adds new action for transfering repository.
+// TransferRepoAction adds new action for transferring repository.
 func TransferRepoAction(u, newUser *User, repo *Repository) (err error) {
        action := &Action{
                ActUserId:    u.Id,
index 3986353192bf87f733b9ec52451c554b98c966c8..125e110a4049b73bcb0fb3d9e602508007722c64 100644 (file)
@@ -41,7 +41,7 @@ var LoginTypes = map[LoginType]string{
        SMTP: "SMTP",
 }
 
-// Ensure structs implmented interface.
+// Ensure structs implemented interface.
 var (
        _ core.Conversion = &LDAPConfig{}
        _ core.Conversion = &SMTPConfig{}
@@ -226,7 +226,7 @@ func UserSignIn(uname, passwd string) (*User, error) {
        }
 }
 
-// Query if name/passwd can login against the LDAP direcotry pool
+// Query if name/passwd can login against the LDAP directory pool
 // Create a local user if success
 // Return the same LoginUserPlain semantic
 // FIXME: https://github.com/gogits/gogs/issues/672
@@ -318,7 +318,7 @@ func SmtpAuth(host string, port int, a smtp.Auth, useTls bool) error {
        return ErrUnsupportedLoginType
 }
 
-// Query if name/passwd can login against the LDAP direcotry pool
+// Query if name/passwd can login against the LDAP directory pool
 // Create a local user if success
 // Return the same LoginUserPlain semantic
 func LoginUserSMTPSource(u *User, name, passwd string, sourceId int64, cfg *SMTPConfig, autoRegister bool) (*User, error) {
index 92a579dfcc34e31c8f3af5d7e1c2e8b8af58a16c..92849f5856e2b17430969718fd4bea14eb855d25 100644 (file)
@@ -107,7 +107,7 @@ func SetEngine() (err error) {
                return fmt.Errorf("models.init(fail to connect to database): %v", err)
        }
 
-       // WARNNING: for serv command, MUST remove the output to os.stdout,
+       // WARNING: for serv command, MUST remove the output to os.stdout,
        // so use log file to instead print to stdout.
        logPath := path.Join(setting.LogRootPath, "xorm.log")
        os.MkdirAll(path.Dir(logPath), os.ModePerm)
index 46e8e492a37d3620ecac9f6c7ec1e76ee39e1160..d19e248c123e91f8b3e73482a67cfd6b0c70d8de 100644 (file)
@@ -79,7 +79,7 @@ func UpdateOauth2(oa *Oauth2) error {
        return err
 }
 
-// GetOauthByUserId returns list of oauthes that are releated to given user.
+// GetOauthByUserId returns list of oauthes that are related to given user.
 func GetOauthByUserId(uid int64) ([]*Oauth2, error) {
        socials := make([]*Oauth2, 0, 5)
        err := x.Find(&socials, Oauth2{Uid: uid})
index 90e5a1f3a09087537f05d1b0c9ce4ebf70bf32d6..41611f8116bc6ff9311b922d395aa5c128d8ece4 100644 (file)
@@ -240,7 +240,7 @@ func IsOrganizationMember(orgId, uid int64) bool {
        return has
 }
 
-// IsPublicMembership returns ture if given user public his/her membership.
+// IsPublicMembership returns true if given user public his/her membership.
 func IsPublicMembership(orgId, uid int64) bool {
        has, _ := x.Where("uid=?", uid).And("org_id=?", orgId).And("is_public=?", true).Get(new(OrgUser))
        return has
@@ -861,7 +861,7 @@ func GetTeamMembers(orgId, teamId int64) ([]*User, error) {
        return us, err
 }
 
-// GetUserTeams returns all teams that user belongs to in given origanization.
+// GetUserTeams returns all teams that user belongs to in given organization.
 func GetUserTeams(orgId, uid int64) ([]*Team, error) {
        tus := make([]*TeamUser, 0, 5)
        if err := x.Where("uid=?", uid).And("org_id=?", orgId).Find(&tus); err != nil {
index f2f810eb7e3d9b5c930b5df194bc612cea4374b0..be03ebd6cd5d96c1b7caf7a967bb7c8dca749119 100644 (file)
@@ -856,7 +856,7 @@ func UpdateRepository(repo *Repository) error {
        return err
 }
 
-// DeleteRepository deletes a repository for a user or orgnaztion.
+// DeleteRepository deletes a repository for a user or organization.
 func DeleteRepository(uid, repoId int64, userName string) error {
        repo := &Repository{Id: repoId, OwnerId: uid}
        has, err := x.Get(repo)
@@ -1239,7 +1239,7 @@ func GitGcRepos() error {
 //   \__/\  /  (____  /__|  \___  >___|  /
 //        \/        \/          \/     \/
 
-// Watch is connection request for receiving repository notifycation.
+// Watch is connection request for receiving repository notification.
 type Watch struct {
        Id     int64
        UserId int64 `xorm:"UNIQUE(watch)"`
index a83051dbbdce1eb99ae91c3e85e9f0e123671000..7e6a6c824f6448bdb0886aa2b3121bba78815118 100644 (file)
@@ -147,7 +147,7 @@ func (u *User) CustomAvatarPath() string {
 }
 
 // UploadAvatar saves custom avatar for user.
-// FIXME: splite uploads to different subdirs in case we have massive users.
+// FIXME: split uploads to different subdirs in case we have massive users.
 func (u *User) UploadAvatar(data []byte) error {
        u.UseCustomAvatar = true
 
@@ -584,7 +584,7 @@ func GetUserIdsByNames(names []string) []int64 {
        return ids
 }
 
-// UserCommit represtns a commit with validation of user.
+// UserCommit represents a commit with validation of user.
 type UserCommit struct {
        User *User
        *git.Commit
@@ -651,7 +651,7 @@ func SearchUserByName(opt SearchOption) (us []*User, err error) {
        return us, err
 }
 
-// Follow is connection request for receiving user notifycation.
+// Follow is connection request for receiving user notification.
 type Follow struct {
        Id       int64
        UserId   int64 `xorm:"unique(follow)"`
index 33146b529a03fdf214e18ed4bdfc57e4559db802..8e112ac572b63102da0a11bcd2c6d906824306f8 100644 (file)
@@ -99,7 +99,7 @@ func (w *Webhook) UpdateEvent() error {
        return err
 }
 
-// HasPushEvent returns true if hook enbaled push event.
+// HasPushEvent returns true if hook enabled push event.
 func (w *Webhook) HasPushEvent() bool {
        if w.PushOnly {
                return true
index 450cdb37e916055e351bab723bd8414b1396dc45..acf4bf02ef2879fb4f20755d1ebd2581425fda64 100644 (file)
@@ -80,7 +80,7 @@ func SignedInUser(req *http.Request, sess session.Store) (*models.User, bool) {
                                                return nil, false
                                        }
 
-                                       // Check if enabled auto-registeration.
+                                       // Check if enabled auto-registration.
                                        if setting.Service.EnableReverseProxyAutoRegister {
                                                u := &models.User{
                                                        Name:     webAuthUser,
index 79b59519e2dd048d1e9f225c9959ed927cececb9..44c130a1048301b1622ce97819b343c56d2f8ce5 100644 (file)
@@ -20,7 +20,7 @@ type Ldapsource struct {
        Port         int    // port number
        UseSSL       bool   // Use SSL
        BaseDN       string // Base DN
-       Attributes   string // Attribut to search
+       Attributes   string // Attribute to search
        Filter       string // Query filter to validate entry
        MsAdSAFormat string // in the case of MS AD Simple Authen, the format to use (see: http://msdn.microsoft.com/en-us/library/cc223499.aspx)
        Enabled      bool   // if this source is disabled
@@ -37,7 +37,7 @@ func AddSource(name string, host string, port int, usessl bool, basedn string, a
        Authensource = append(Authensource, ldaphost)
 }
 
-//LoginUser : try to login an user to LDAP sources, return requested (attribut,true) if ok, ("",false) other wise
+//LoginUser : try to login an user to LDAP sources, return requested (attribute,true) if ok, ("",false) other wise
 //First match wins
 //Returns first attribute if exists
 func LoginUser(name, passwd string) (a string, r bool) {
index 225d6c8183019cf88f932a4038d201e11fac7d18..c0a71f11debcedcf69d0cdd921350f4effbb6939 100644 (file)
@@ -46,7 +46,7 @@ func init() {
 }
 
 // hash email to md5 string
-// keep this func in order to make this package indenpent
+// keep this func in order to make this package independent
 func HashEmail(email string) string {
        // https://en.gravatar.com/site/implement/hash/
        email = strings.TrimSpace(email)
index 8653a47b453acfec162494b570c658228905ea3c..67856fe7a6002ea757ef42e90311196d4b9fb85a 100644 (file)
@@ -6,7 +6,7 @@ import (
        "github.com/gogits/gogs/modules/asn1-ber"
 )
 
-// debbuging type
+// debugging type
 //     - has a Printf method to write the debug output
 type debugging bool
 
index 4fb74d40c83dfb70bc2aa77e73c695bb79ddd3a3..82492ce3fa63234a3aaa934689c66e60b04607af 100644 (file)
@@ -162,7 +162,7 @@ func newLogger(buffer int64) *Logger {
        return l
 }
 
-// SetLogger sets new logger instanse with given logger adapter and config.
+// SetLogger sets new logger instance with given logger adapter and config.
 func (l *Logger) SetLogger(adapter string, config string) error {
        l.lock.Lock()
        defer l.lock.Unlock()
index 14fa3b883a850064c9151e13e56dc152ffa3b5b8..eef8ed31478f718ce21a1a9b5ff80a6bdb0d2545 100644 (file)
@@ -32,7 +32,7 @@ const (
 )
 
 // A Decoder is a function that decodes a character set, one character at a time.
-// It works much like utf8.DecodeRune, but has an aditional status return value.
+// It works much like utf8.DecodeRune, but has an additional status return value.
 type Decoder func(p []byte) (c rune, size int, status Status)
 
 // An Encoder is a function that encodes a character set, one character at a time.
index 7cc7a6d813ab449c3411912b489374e5d6737610..8b0f0c59f7fabd7b39dd60cdcce5610b5573a1ef 100644 (file)
@@ -453,7 +453,7 @@ func RequireTrueOwner() macaron.Handler {
        }
 }
 
-// GitHookService checks if repsitory Git hooks service has been enabled.
+// GitHookService checks if repository Git hooks service has been enabled.
 func GitHookService() macaron.Handler {
        return func(ctx *Context) {
                if !ctx.User.AllowGitHook && !ctx.User.IsAdmin {
index b1efc9c7a88ffd844be9564fbcc84055507467ef..7765a859ab87a3c7fc39d2ce595cee4e1315c31e 100644 (file)
@@ -260,7 +260,7 @@ func NewConfigContext() {
                log.Fatal(4, "Expect user(%s) but current user is: %s", RunUser, curUser)
        }
 
-       // Determine and create root git reposiroty path.
+       // Determine and create root git repository path.
        homeDir, err := com.HomeDir()
        if err != nil {
                log.Fatal(4, "Fail to get home directory: %v", err)
index 750f4e40c641395e617ef0dae006b52f55793a56..999fd0a8920d188a0c1a1e1b4db55abeef1adf80 100644 (file)
@@ -628,7 +628,7 @@ func UpdateAssignee(ctx *middleware.Context) {
        }
 
        aid := com.StrTo(ctx.Query("assigneeid")).MustInt64()
-       // Not check for invalid assignne id and give responsibility to owners.
+       // Not check for invalid assignee id and give responsibility to owners.
        issue.AssigneeId = aid
        if err = models.UpdateIssueUserPairByAssignee(aid, issue.Id); err != nil {
                ctx.Handle(500, "UpdateIssueUserPairByAssignee: %v", err)