Skip to content

Commit d42fb0e

Browse files
committed
Fix spelling mistakes, add Go Report Card badge
1 parent ef3359a commit d42fb0e

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# go-gitdiff
22

3-
[![GoDoc](https://godoc.org/github.com/bluekeyes/go-gitdiff/gitdiff?status.svg)](http://godoc.org/github.com/bluekeyes/go-gitdiff/gitdiff)
3+
[![GoDoc](https://godoc.org/github.com/bluekeyes/go-gitdiff/gitdiff?status.svg)](http://godoc.org/github.com/bluekeyes/go-gitdiff/gitdiff) [![Go Report Card](https://goreportcard.com/badge/github.com/bluekeyes/go-gitdiff)](https://goreportcard.com/report/github.com/bluekeyes/go-gitdiff)
44

55
A Go library for parsing and applying patches generated by `git diff`, `git
66
show`, and `git format-patch`. It can also parse and apply unified diffs

gitdiff/file_header.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ func parseMode(s string) (os.FileMode, error) {
302302

303303
// parseName extracts a file name from the start of a string and returns the
304304
// name and the index of the first character after the name. If the name is
305-
// unquoted and term is non-negative, parsing stops at the first occurance of
305+
// unquoted and term is non-negative, parsing stops at the first occurrence of
306306
// term. Otherwise parsing of unquoted names stops at the first space or tab.
307307
//
308308
// If the name is exactly "/dev/null", no further processing occurs. Otherwise,

gitdiff/file_header_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ func TestParseName(t *testing.T) {
368368
}
369369

370370
if output != test.Output {
371-
t.Errorf("incorect output: expected %q, actual: %q", test.Output, output)
371+
t.Errorf("incorrect output: expected %q, actual: %q", test.Output, output)
372372
}
373373
if n != test.N {
374374
t.Errorf("incorrect next position: expected %d, actual %d", test.N, n)

gitdiff/gitdiff.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ type TextFragment struct {
5656
Lines []Line
5757
}
5858

59-
// Header returns the cannonical header of this fragment.
59+
// Header returns the canonical header of this fragment.
6060
func (f *TextFragment) Header() string {
6161
return fmt.Sprintf("@@ -%d,%d +%d,%d @@ %s", f.OldPosition, f.OldLines, f.NewPosition, f.NewLines, f.Comment)
6262
}

0 commit comments

Comments
 (0)