diff options
| author | lye <lye@> | 2014-02-23 18:04:55 -0600 |
|---|---|---|
| committer | lye <lye@> | 2014-02-23 18:06:04 -0600 |
| commit | 375168abdc4cfad66d75786e31ee758bc5e374b7 (patch) | |
| tree | d8a0e6e0a65400bcdd10332c632fbad4a8ed0230 /diff.go | |
| parent | bc80beb8432091bdf1190ad6b803060324802685 (diff) | |
Export the constants and enumerations for diffs.
It is possible that the typed enums from libgit2 should be exported as
distinct types rather than numeric constants (e.g, `git_delta_t` and
`git_line_t` should be typed), but this has not been done in this patch.
Diffstat (limited to 'diff.go')
| -rw-r--r-- | diff.go | 27 |
1 files changed, 27 insertions, 0 deletions
@@ -11,6 +11,33 @@ import ( "unsafe" ) +const ( + DiffFlagBinary = C.GIT_DIFF_FLAG_BINARY + DiffFlagNotBinary = C.GIT_DIFF_FLAG_NOT_BINARY + DiffFlagValidOid = C.GIT_DIFF_FLAG_VALID_OID + + DeltaUnmodified = C.GIT_DELTA_UNMODIFIED + DeltaAdded = C.GIT_DELTA_ADDED + DeltaDeleted = C.GIT_DELTA_DELETED + DeltaModified = C.GIT_DELTA_MODIFIED + DeltaRenamed = C.GIT_DELTA_RENAMED + DeltaCopied = C.GIT_DELTA_COPIED + DeltaIgnored = C.GIT_DELTA_IGNORED + DeltaUntracked = C.GIT_DELTA_UNTRACKED + DeltaTypeChange = C.GIT_DELTA_TYPECHANGE + + DiffLineContext = C.GIT_DIFF_LINE_CONTEXT + DiffLineAddition = C.GIT_DIFF_LINE_ADDITION + DiffLineDeletion = C.GIT_DIFF_LINE_DELETION + DiffLineContextEOFNL = C.GIT_DIFF_LINE_CONTEXT_EOFNL + DiffLineAddEOFNL = C.GIT_DIFF_LINE_ADD_EOFNL + DiffLineDelEOFNL = C.GIT_DIFF_LINE_DEL_EOFNL + + DiffLineFileHdr = C.GIT_DIFF_LINE_FILE_HDR + DiffLineHunkHdr = C.GIT_DIFF_LINE_HUNK_HDR + DiffLineBinary = C.GIT_DIFF_LINE_BINARY +) + type DiffFile struct { file C.git_diff_file } |
