diff options
author | Jerry-yz <yz386071268@gmail.com> | 2024-01-15 10:27:15 +0800 |
---|---|---|
committer | Jerry-yz <yz386071268@gmail.com> | 2024-01-15 10:27:15 +0800 |
commit | 90498b3becf13415bd1275f59c807340080f9e41 (patch) | |
tree | 95cc6bc881488b287a71c515d1d0fecac6f05dde /plumbing/object/commit.go | |
parent | a6e934f1f76996c7f92cb4fde708170c1eb5d032 (diff) | |
download | go-git-90498b3becf13415bd1275f59c807340080f9e41.tar.gz |
plumbing: fix variable defaultUtf8CommitMessageEncoding name spell error
Diffstat (limited to 'plumbing/object/commit.go')
-rw-r--r-- | plumbing/object/commit.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/plumbing/object/commit.go b/plumbing/object/commit.go index ceed5d0..3d096e1 100644 --- a/plumbing/object/commit.go +++ b/plumbing/object/commit.go @@ -27,7 +27,7 @@ const ( // the commit with the "mergetag" header. headermergetag string = "mergetag" - defaultUtf8CommitMesageEncoding MessageEncoding = "UTF-8" + defaultUtf8CommitMessageEncoding MessageEncoding = "UTF-8" ) // Hash represents the hash of an object @@ -189,7 +189,7 @@ func (c *Commit) Decode(o plumbing.EncodedObject) (err error) { } c.Hash = o.Hash() - c.Encoding = defaultUtf8CommitMesageEncoding + c.Encoding = defaultUtf8CommitMessageEncoding reader, err := o.Reader() if err != nil { @@ -335,7 +335,7 @@ func (c *Commit) encode(o plumbing.EncodedObject, includeSig bool) (err error) { } } - if string(c.Encoding) != "" && c.Encoding != defaultUtf8CommitMesageEncoding { + if string(c.Encoding) != "" && c.Encoding != defaultUtf8CommitMessageEncoding { if _, err = fmt.Fprintf(w, "\n%s %s", headerencoding, c.Encoding); err != nil { return err } |