|
| 1 | +-- Copyright (c) 2010-2012 by Robert G. Jakabosky <bobby@sharedrealm.com> |
| 2 | +-- |
| 3 | +-- Permission is hereby granted, free of charge, to any person obtaining a copy |
| 4 | +-- of this software and associated documentation files (the "Software"), to deal |
| 5 | +-- in the Software without restriction, including without limitation the rights |
| 6 | +-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
| 7 | +-- copies of the Software, and to permit persons to whom the Software is |
| 8 | +-- furnished to do so, subject to the following conditions: |
| 9 | +-- |
| 10 | +-- The above copyright notice and this permission notice shall be included in |
| 11 | +-- all copies or substantial portions of the Software. |
| 12 | +-- |
| 13 | +-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 14 | +-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 15 | +-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
| 16 | +-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| 17 | +-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
| 18 | +-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
| 19 | +-- THE SOFTWARE. |
| 20 | + |
| 21 | +object "CheckoutOptions" { |
| 22 | + c_source [[ |
| 23 | +typedef git_checkout_options CheckoutOptions; |
| 24 | +]], |
| 25 | + constants { |
| 26 | + VERSION = 1, |
| 27 | + SAFE = 0, |
| 28 | + FORCE = 2, |
| 29 | + RECREATE_MISSING = 4, |
| 30 | + ALLOW_CONFLICTS = 16, |
| 31 | + REMOVE_UNTRACKED = 32, |
| 32 | + REMOVE_IGNORED = 64, |
| 33 | + UPDATE_ONLY = 128, |
| 34 | + DONT_UPDATE_INDEX = 256, |
| 35 | + NO_REFRESH = 512, |
| 36 | + SKIP_UNMERGED = 1024, |
| 37 | + USE_OURS = 2048, |
| 38 | + USE_THEIRS = 4096, |
| 39 | + DISABLE_PATHSPEC_MATCH = 8192, |
| 40 | + SKIP_LOCKED_DIRECTORIES = 262144, |
| 41 | + DONT_OVERWRITE_IGNORED = 524288, |
| 42 | + CONFLICT_STYLE_MERGE = 1048576, |
| 43 | + CONFLICT_STYLE_DIFF3 = 2097152, |
| 44 | + DONT_REMOVE_EXISTING = 4194304, |
| 45 | + DONT_WRITE_INDEX = 8388608, |
| 46 | + DRY_RUN = 16777216, |
| 47 | + CONFLICT_STYLE_ZDIFF3 = 33554432, |
| 48 | + NONE = 1073741824, |
| 49 | + UPDATE_SUBMODULES = 65536, |
| 50 | + UPDATE_SUBMODULES_IF_CHANGED = 131072, |
| 51 | + }, |
| 52 | + constructor "init" { |
| 53 | + c_source [[ |
| 54 | + ${this} = calloc(1, sizeof(CheckoutOptions)); |
| 55 | + git_checkout_options_init(${this}, GIT_STATUS_OPTIONS_VERSION); |
| 56 | +]], |
| 57 | + }, |
| 58 | + destructor { |
| 59 | + c_source [[ |
| 60 | + free(${this}); |
| 61 | +]] |
| 62 | + }, |
| 63 | + field "unsigned int" "version", |
| 64 | + field "unsigned int" "checkout_strategy", |
| 65 | + method "set_checkout_strategy" { |
| 66 | + var_in { "unsigned int", "checkout_strategy" }, |
| 67 | + c_source [[ |
| 68 | + ${this}->checkout_strategy = ${checkout_strategy}; |
| 69 | +]], |
| 70 | + }, |
| 71 | + field "int" "disable_filters", |
| 72 | + method "set_disable_filters" { |
| 73 | + var_in { "int", "disable_filters" }, |
| 74 | + c_source [[ |
| 75 | + ${this}->disable_filters = ${disable_filters}; |
| 76 | +]], |
| 77 | + }, |
| 78 | + field "unsigned int" "dir_mode", |
| 79 | + method "set_dir_mode" { |
| 80 | + var_in { "unsigned int", "dir_mode" }, |
| 81 | + c_source [[ |
| 82 | + ${this}->dir_mode = ${dir_mode}; |
| 83 | +]], |
| 84 | + }, |
| 85 | + field "unsigned int" "file_mode", |
| 86 | + method "set_file_mode" { |
| 87 | + var_in { "unsigned int", "file_mode" }, |
| 88 | + c_source [[ |
| 89 | + ${this}->file_mode = ${file_mode}; |
| 90 | +]], |
| 91 | + }, |
| 92 | + field "int" "file_open_flags", |
| 93 | + method "set_file_open_flags" { |
| 94 | + var_in { "int", "file_open_flags" }, |
| 95 | + c_source [[ |
| 96 | + ${this}->file_open_flags = ${file_open_flags}; |
| 97 | +]], |
| 98 | + }, |
| 99 | + field "unsigned int" "notify_flags", |
| 100 | + method "set_notify_flags" { |
| 101 | + var_in { "unsigned int", "notify_flags" }, |
| 102 | + c_source [[ |
| 103 | + ${this}->notify_flags = ${notify_flags}; |
| 104 | +]], |
| 105 | + }, |
| 106 | + method "paths" { |
| 107 | + var_out { "StrArray *", "paths" }, |
| 108 | + c_source [[ |
| 109 | + ${paths} = &${this}->paths; |
| 110 | +]], |
| 111 | + }, |
| 112 | + method "set_paths" { |
| 113 | + var_in { "StrArray *", "paths" }, |
| 114 | + c_source [[ |
| 115 | + ${this}->paths.strings = ${paths}->strings; |
| 116 | + ${this}->paths.count = ${paths}->count; |
| 117 | +]], |
| 118 | + }, |
| 119 | + field "Tree *" "baseline", |
| 120 | + method "set_baseline" { |
| 121 | + var_in { "Tree *", "baseline" }, |
| 122 | + c_source [[ |
| 123 | + ${this}->baseline = ${baseline}; |
| 124 | +]], |
| 125 | + }, |
| 126 | + field "Index *" "baseline_index", |
| 127 | + method "set_baseline_index" { |
| 128 | + var_in { "Index *", "baseline_index" }, |
| 129 | + c_source [[ |
| 130 | + ${this}->baseline_index = ${baseline_index}; |
| 131 | +]], |
| 132 | + }, |
| 133 | + field "const char *" "target_directory", |
| 134 | + method "set_target_directory" { |
| 135 | + var_in { "const char *", "target_directory" }, |
| 136 | + c_source [[ |
| 137 | + ${this}->target_directory = ${target_directory}; |
| 138 | +]], |
| 139 | + }, |
| 140 | + field "const char *" "ancestor_label", |
| 141 | + method "set_ancestor_label" { |
| 142 | + var_in { "const char *", "ancestor_label" }, |
| 143 | + c_source [[ |
| 144 | + ${this}->ancestor_label = ${ancestor_label}; |
| 145 | +]], |
| 146 | + }, |
| 147 | + field "const char *" "our_label", |
| 148 | + method "set_our_label" { |
| 149 | + var_in { "const char *", "our_label" }, |
| 150 | + c_source [[ |
| 151 | + ${this}->our_label = ${our_label}; |
| 152 | +]], |
| 153 | + }, |
| 154 | + field "const char *" "their_label", |
| 155 | + method "set_their_label" { |
| 156 | + var_in { "const char *", "their_label" }, |
| 157 | + c_source [[ |
| 158 | + ${this}->their_label = ${their_label}; |
| 159 | +]], |
| 160 | + }, |
| 161 | +} |
0 commit comments