| 144 | |
| 145 | |
| 146 | class CheckoutStrategy(IntFlag): |
| 147 | NONE = _pygit2.GIT_CHECKOUT_NONE |
| 148 | 'Dry run, no actual updates' |
| 149 | |
| 150 | SAFE = _pygit2.GIT_CHECKOUT_SAFE |
| 151 | """ |
| 152 | Allow safe updates that cannot overwrite uncommitted data. |
| 153 | If the uncommitted changes don't conflict with the checked out files, |
| 154 | the checkout will still proceed, leaving the changes intact. |
| 155 | |
| 156 | Mutually exclusive with FORCE. |
| 157 | FORCE takes precedence over SAFE. |
| 158 | """ |
| 159 | |
| 160 | FORCE = _pygit2.GIT_CHECKOUT_FORCE |
| 161 | """ |
| 162 | Allow all updates to force working directory to look like index. |
| 163 | |
| 164 | Mutually exclusive with SAFE. |
| 165 | FORCE takes precedence over SAFE. |
| 166 | """ |
| 167 | |
| 168 | RECREATE_MISSING = _pygit2.GIT_CHECKOUT_RECREATE_MISSING |
| 169 | """ Allow checkout to recreate missing files """ |
| 170 | |
| 171 | ALLOW_CONFLICTS = _pygit2.GIT_CHECKOUT_ALLOW_CONFLICTS |
| 172 | """ Allow checkout to make safe updates even if conflicts are found """ |
| 173 | |
| 174 | REMOVE_UNTRACKED = _pygit2.GIT_CHECKOUT_REMOVE_UNTRACKED |
| 175 | """ Remove untracked files not in index (that are not ignored) """ |
| 176 | |
| 177 | REMOVE_IGNORED = _pygit2.GIT_CHECKOUT_REMOVE_IGNORED |
| 178 | """ Remove ignored files not in index """ |
| 179 | |
| 180 | UPDATE_ONLY = _pygit2.GIT_CHECKOUT_UPDATE_ONLY |
| 181 | """ Only update existing files, don't create new ones """ |
| 182 | |
| 183 | DONT_UPDATE_INDEX = _pygit2.GIT_CHECKOUT_DONT_UPDATE_INDEX |
| 184 | """ |
| 185 | Normally checkout updates index entries as it goes; this stops that. |
| 186 | Implies `DONT_WRITE_INDEX`. |
| 187 | """ |
| 188 | |
| 189 | NO_REFRESH = _pygit2.GIT_CHECKOUT_NO_REFRESH |
| 190 | """ Don't refresh index/config/etc before doing checkout """ |
| 191 | |
| 192 | SKIP_UNMERGED = _pygit2.GIT_CHECKOUT_SKIP_UNMERGED |
| 193 | """ Allow checkout to skip unmerged files """ |
| 194 | |
| 195 | USE_OURS = _pygit2.GIT_CHECKOUT_USE_OURS |
| 196 | """ For unmerged files, checkout stage 2 from index """ |
| 197 | |
| 198 | USE_THEIRS = _pygit2.GIT_CHECKOUT_USE_THEIRS |
| 199 | """ For unmerged files, checkout stage 3 from index """ |
| 200 | |
| 201 | DISABLE_PATHSPEC_MATCH = _pygit2.GIT_CHECKOUT_DISABLE_PATHSPEC_MATCH |
| 202 | """ Treat pathspec as simple list of exact match file paths """ |
| 203 |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…