diff options
author | David Symonds <dsymonds@golang.org> | 2009-11-11 17:31:28 -0800 |
---|---|---|
committer | David Symonds <dsymonds@golang.org> | 2009-11-11 17:31:28 -0800 |
commit | 8738c4dfb1033617c3382857ba83cb501b974716 (patch) | |
tree | c5c003c2022df521ae180474d8433fd658a41c5d /src/pkg/patch/git.go | |
parent | cd8bb89d919dc71aacca0ba38a3d15a1e46dc877 (diff) | |
download | golang-8738c4dfb1033617c3382857ba83cb501b974716.tar.gz |
Fix capitalisation of "Git".
R=rsc
http://codereview.appspot.com/154071
Committer: Russ Cox <rsc@golang.org>
Diffstat (limited to 'src/pkg/patch/git.go')
-rw-r--r-- | src/pkg/patch/git.go | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/pkg/patch/git.go b/src/pkg/patch/git.go index fd5d781a2..63bf2cd74 100644 --- a/src/pkg/patch/git.go +++ b/src/pkg/patch/git.go @@ -25,16 +25,16 @@ func gitSHA1(data []byte) []byte { return h.Sum(); } -// BUG(rsc): The GIT binary delta format is not implemented, only GIT binary literals. +// BUG(rsc): The Git binary delta format is not implemented, only Git binary literals. -// GITBinaryLiteral represents a GIT binary literal diff. -type GITBinaryLiteral struct { +// GitBinaryLiteral represents a Git binary literal diff. +type GitBinaryLiteral struct { OldSHA1 []byte; // if non-empty, the SHA1 hash of the original New []byte; // the new contents } // Apply implements the Diff interface's Apply method. -func (d *GITBinaryLiteral) Apply(old []byte) ([]byte, os.Error) { +func (d *GitBinaryLiteral) Apply(old []byte) ([]byte, os.Error) { if sum := gitSHA1(old); !bytes.HasPrefix(sum, d.OldSHA1) { return nil, ErrPatchFailure } @@ -67,8 +67,8 @@ func getHex(s []byte) (data []byte, rest []byte) { return; } -// ParseGITBinary parses raw as a GIT binary patch. -func ParseGITBinary(raw []byte) (Diff, os.Error) { +// ParseGitBinary parses raw as a Git binary patch. +func ParseGitBinary(raw []byte) (Diff, os.Error) { var oldSHA1, newSHA1 []byte; var sawBinary bool; @@ -105,16 +105,16 @@ func ParseGITBinary(raw []byte) (Diff, os.Error) { var buf [1]byte; m, err := z.Read(&buf); if m != 0 || err != os.EOF { - return nil, os.NewError("GIT binary literal longer than expected") + return nil, os.NewError("Git binary literal longer than expected") } if sum := gitSHA1(data); !bytes.HasPrefix(sum, newSHA1) { - return nil, os.NewError("GIT binary literal SHA1 mismatch") + return nil, os.NewError("Git binary literal SHA1 mismatch") } - return &GITBinaryLiteral{oldSHA1, data}, nil; + return &GitBinaryLiteral{oldSHA1, data}, nil; } if !sawBinary { - return nil, os.NewError("unexpected GIT patch header: " + string(first)) + return nil, os.NewError("unexpected Git patch header: " + string(first)) } } panic("unreachable"); |