(c *C.git_checkout_options)
| 66 | } |
| 67 | |
| 68 | func checkoutOptionsFromC(c *C.git_checkout_options) CheckoutOptions { |
| 69 | opts := CheckoutOptions{ |
| 70 | Strategy: CheckoutStrategy(c.checkout_strategy), |
| 71 | DisableFilters: c.disable_filters != 0, |
| 72 | DirMode: os.FileMode(c.dir_mode), |
| 73 | FileMode: os.FileMode(c.file_mode), |
| 74 | FileOpenFlags: int(c.file_open_flags), |
| 75 | NotifyFlags: CheckoutNotifyType(c.notify_flags), |
| 76 | } |
| 77 | if c.notify_payload != nil { |
| 78 | opts.NotifyCallback = pointerHandles.Get(c.notify_payload).(*checkoutCallbackData).options.NotifyCallback |
| 79 | } |
| 80 | if c.progress_payload != nil { |
| 81 | opts.ProgressCallback = pointerHandles.Get(c.progress_payload).(*checkoutCallbackData).options.ProgressCallback |
| 82 | } |
| 83 | if c.target_directory != nil { |
| 84 | opts.TargetDirectory = C.GoString(c.target_directory) |
| 85 | } |
| 86 | return opts |
| 87 | } |
| 88 | |
| 89 | type checkoutCallbackData struct { |
| 90 | options *CheckoutOptions |
no test coverage detected
searching dependent graphs…