()
| 573 | } |
| 574 | |
| 575 | func 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 | |
| 596 | var ( |
| 597 | ErrDeltaSkip = errors.New("Skip delta") |
searching dependent graphs…