MCPcopy Create free account
hub / github.com/libgit2/git2go / DefaultDiffFindOptions

Function DefaultDiffFindOptions

diff.go:575–594  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

573}
574
575func DefaultDiffFindOptions() (DiffFindOptions, error) {
576 opts := C.git_diff_find_options{}
577
578 runtime.LockOSThread()
579 defer runtime.UnlockOSThread()
580
581 ecode := C.git_diff_find_options_init(&opts, C.GIT_DIFF_FIND_OPTIONS_VERSION)
582 if ecode < 0 {
583 return DiffFindOptions{}, MakeGitError(ecode)
584 }
585
586 return DiffFindOptions{
587 Flags: DiffFindOptionsFlag(opts.flags),
588 RenameThreshold: uint16(opts.rename_threshold),
589 CopyThreshold: uint16(opts.copy_threshold),
590 RenameFromRewriteThreshold: uint16(opts.rename_from_rewrite_threshold),
591 BreakRewriteThreshold: uint16(opts.break_rewrite_threshold),
592 RenameLimit: uint(opts.rename_limit),
593 }, nil
594}
595
596var (
597 ErrDeltaSkip = errors.New("Skip delta")

Callers 1

TestFindSimilarFunction · 0.85

Calls 2

MakeGitErrorFunction · 0.85
DiffFindOptionsFlagTypeAlias · 0.85

Tested by 1

TestFindSimilarFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…