Source File
references.go
Belonging Package
github.com/go-git/go-git/v5
package git
import (
)
return removeComp(, , equivalent)
}
type commitSorterer struct {
l []*object.Commit
}
func ( commitSorterer) () int {
return len(.l)
}
func ( commitSorterer) (, int) bool {
return .l[].Committer.When.Before(.l[].Committer.When) ||
.l[].Committer.When.Equal(.l[].Committer.When) &&
.l[].Author.When.Before(.l[].Author.When)
}
func ( commitSorterer) (, int) {
.l[], .l[] = .l[], .l[]
}
func ( []*object.Commit) {
:= &commitSorterer{}
sort.Sort()
}
, := parentsContainingPath(, )
if != nil {
return
}
, := differentContents(, , )
if != nil {
return
}
if len() == 1 {
* = append(*, )
return (, , [0], )
func ( string, , *object.Commit) (bool, error) {
:= .NumParents()
:= .NumParents()
return diff.Do(, ), nil
}
func (, []diffmatchpatch.Diff) bool {
if len() != len() {
return false
}
for := range {
if !sameDiff([], []) {
return false
}
}
return true
}
func (, diffmatchpatch.Diff) bool {
if .Type != .Type {
return false
}
switch .Type {
case 0:
return countLines(.Text) == countLines(.Text)
case 1, -1:
return .Text == .Text
default:
panic("unreachable")
}
![]() |
The pages are generated with Golds v0.3.2-preview. (GOOS=darwin GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds. |