diff options
| author | Carlos Martín Nieto <[email protected]> | 2014-12-30 10:09:20 +0000 |
|---|---|---|
| committer | Carlos Martín Nieto <[email protected]> | 2014-12-30 10:09:20 +0000 |
| commit | 42414248f9d4fb77cc4b48447364a6dcb1624607 (patch) | |
| tree | 5dbc19b7a1d5d6faa8fecf4c8b6b2c4559084d4e /diff.go | |
| parent | 74957c2ae6dc852a50de54fc788f207d8f385d67 (diff) | |
| parent | d2a9d7768bb76719ac4506715ec8037fea3609a2 (diff) | |
Merge pull request #150 from sqs/DiffOptions_OldPrefix_and_NewPrefix
Diff: heed DiffOptions fields OldPrefix and NewPrefix
Diffstat (limited to 'diff.go')
| -rw-r--r-- | diff.go | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -371,6 +371,8 @@ func DefaultDiffOptions() (DiffOptions, error) { InterhunkLines: uint32(opts.interhunk_lines), IdAbbrev: uint16(opts.id_abbrev), MaxSize: int(opts.max_size), + OldPrefix: "a", + NewPrefix: "b", }, nil } @@ -479,6 +481,8 @@ func diffOptionsToC(opts *DiffOptions) (copts *C.git_diff_options, notifyData *d interhunk_lines: C.uint32_t(opts.InterhunkLines), id_abbrev: C.uint16_t(opts.IdAbbrev), max_size: C.git_off_t(opts.MaxSize), + old_prefix: C.CString(opts.OldPrefix), + new_prefix: C.CString(opts.NewPrefix), } if opts.NotifyCallback != nil { @@ -493,6 +497,8 @@ func freeDiffOptions(copts *C.git_diff_options) { if copts != nil { cpathspec := copts.pathspec freeStrarray(&cpathspec) + C.free(unsafe.Pointer(copts.old_prefix)) + C.free(unsafe.Pointer(copts.new_prefix)) } } |
