summaryrefslogtreecommitdiff
path: root/include/git2/checkout.h
Commit message (Collapse)AuthorAgeFilesLines
* checkout: better document the `baseline_index` optEdward Thomson2015-05-111-1/+9
|
* checkout: allow baseline to be specified as indexEdward Thomson2015-05-111-0/+1
| | | | | | Allow the baseline to be specified as an index, so that users need not write their index to a tree just to checkout with that as the baseline.
* checkout: remove `GIT_CHECKOUT_SAFE_CREATE` as a strategyEdward Thomson2015-02-271-17/+10
|
* checkout: introduce GIT_CHECKOUT_DONT_WRITE_INDEXEdward Thomson2015-02-141-1/+7
|
* checkout: remove files before writing new onesEdward Thomson2015-01-201-0/+8
| | | | | | | On case insensitive filesystems, we may have files in the working directory that case fold to a name we want to write. Remove those files (by default) so that we will not end up with a filename that has the unexpected case.
* checkout: introduce git_checkout_perfdataEdward Thomson2015-01-201-0/+15
| | | | | Checkout can now provide performance data about the number of (some) syscalls performed using an optional callback.
* checkout: fix docs formatting for the optionsCarlos Martín Nieto2014-07-111-12/+12
|
* Formatting fixes for the docsCarlos Martín Nieto2014-06-031-12/+12
| | | | | These are some issues I found while playing around with the new parser for docurium.
* Fix remaining init_options inconsistenciesRussell Belfer2014-05-021-6/+5
| | | | | There were a couple of "init_opts()" functions a few more cases of structure initialization that I somehow missed.
* git_checkout_opts -> git_checkout_optionsBen Straub2014-03-061-14/+14
|
* Added function-based initializers for every options struct.Matthew Bowen2014-03-051-0/+13
| | | | The basic structure of each function is courtesy of arrbee.
* Introduce diff3 mode for checking out conflictsEdward Thomson2014-01-201-0/+7
|
* Overwrite ignored files on checkoutEdward Thomson2013-12-131-0/+8
|
* Fix checkout notify callback docs and testsRussell Belfer2013-12-111-8/+13
| | | | | | | The checkout notify callback behavior on non-zero return values was not being tested. This adds tests, fixes a bug with positive values, and clarifies the documentation to make it clear that the checkout can be canceled via this mechanism.
* Checkout: Don't assert if treeish is NULLSascha Cunz2013-11-021-1/+1
| | | | | | | | In git_checkout_tree, the first check tests if either repo or treeish is NULL and says that eithor of them has to have a valid value. But there is no code to handle the treeish == NULL case. So, do something meaningful in that case: use HEAD instead.
* Checkout: Unifiy const-ness of `opts` parameterSascha Cunz2013-11-021-2/+2
| | | | | Since all 3 checkout APIs perform the same operation with the options, all of them should use the same const-ness.
* checkout (from index) can write conflictsEdward Thomson2013-10-161-7/+10
|
* clone: const-ify checkout optionsCarlos Martín Nieto2013-10-021-1/+1
| | | | | The removal of many options which lead to the direct usage of the user's checkout options means we should make sure they remain const.
* No such thing as an orphan branchCarlos Martín Nieto2013-09-171-1/+1
| | | | | | | | | | | Unfortunately git-core uses the term "unborn branch" and "orphan branch" interchangeably. However, "orphan" is only really there for the checkout command, which has the `--orphan` option so it doesn't actually create the branch. Branches never have parents, so the distinction of a branch with no parents is odd to begin with. Crucially, the error messages deal with unborn branches, so let's use that.
* Add target directory to checkoutRussell Belfer2013-06-211-0/+2
| | | | | | | | | | | | | | | | This adds the ability for checkout to write to a target directory instead of having to use the working directory of the repository. This makes it easier to do exports of repository data and the like. This is similar to, but not quite the same as, the --prefix option to `git checkout-index` (this will always be treated as a directory name, not just as a simple text prefix). As part of this, the workdir iterator was extended to take the path to the working directory as a parameter and fallback on the git_repository_workdir result only if it's not specified. Fixes #1332
* Fix checkout of modified file when missing from wdRussell Belfer2013-06-211-0/+2
| | | | | | | | | | This fixes the checkout case when a file is modified between the baseline and the target and yet missing in the working directory. The logic for that case appears to have been wrong. This also adds a useful checkout notify callback to the checkout test helpers that will count notifications and also has a debug mode to visualize what checkout thinks that it's doing.
* allow checkout to proceed when a dir to be removed is in use (win32)Edward Thomson2013-05-031-0/+3
|
* Add GIT_CHECKOUT_DISABLE_PATHSPEC_MATCHRussell Belfer2013-01-101-1/+5
| | | | | | | This adds an option to checkout a la the diff option to turn off fnmatch evaluation for pathspec entries. This can be useful to make sure your "pattern" in really interpretted as an exact file match only.
* update copyrightsEdward Thomson2013-01-081-1/+1
|
* Correct typos in documentationKevin Sawicki2013-01-061-3/+3
|
* Simplify checkout documentationRussell Belfer2013-01-041-126/+93
| | | | | | This moves a lot of the detailed checkout documentation into a new file (docs/checkout-internals.md) and simplifies the public docs for the checkout API.
* Add index updating to checkoutRussell Belfer2013-01-041-1/+4
| | | | | | | Make checkout update entries in the index for all files that are updated and/or removed, unless flag GIT_CHECKOUT_DONT_UPDATE_INDEX is given. To do this, iterators were extended to allow a little more introspection into the index being iterated over, etc.
* More checkout improvementsRussell Belfer2013-01-041-28/+32
| | | | | | | This flips checkout back to be driven off the changes between the baseline and the target trees. This reinstates the complex code for tracking the contents of the working directory, but overall, I think the resulting logic is easier to follow.
* Rework checkout internals (again)Russell Belfer2013-01-041-96/+165
| | | | | | | | | | | | | | | | I've tried to map out the detailed behaviors of checkout and make sure that we're handling the various cases correctly, along with providing options to allow us to emulate "git checkout" and "git checkout-index" with the various flags. I've thrown away flags in the checkout API that seemed like clutter and added some new ones. Also, I've converted the conflict callback to a general notification callback so we can emulate "git checkout" output and display "dirty" files. As of this commit, the new behavior is not working 100% but some of that is probably baked into tests that are not testing the right thing. This is a decent snapshot point, I think, along the way to getting the update done.
* Allow compilation as C++Ben Straub2012-12-061-1/+1
|
* Add version fields and init macros for public input structs.Ben Straub2012-11-301-1/+2
|
* More external API cleanupVicent Marti2012-11-271-1/+7
| | | | | | Conflicts: src/branch.c tests-clar/refs/branches/create.c
* Add explicit git_index ptr to diff and checkoutRussell Belfer2012-11-141-1/+3
| | | | | | | | A number of diff APIs and the `git_checkout_index` API take a `git_repository` object an operate on the index. This updates them to take a `git_index` pointer explicitly and only fall back on the `git_repository` index if the index input is NULL. This makes it easier to operate on a temporary index.
* Fix various cross-platform build issuesRussell Belfer2012-11-091-5/+9
| | | | | | This fixes a number of warnings and problems with cross-platform builds. Among other things, it's not safe to name a member of a structure "strcmp" because that may be #defined.
* Rework checkout with new strategy optionsRussell Belfer2012-11-091-29/+126
| | | | | | | | | | | | | | | | | | This is a major reworking of checkout strategy options. The checkout code is now sensitive to the contents of the HEAD tree and the new options allow you to update the working tree so that it will match the index content only when it previously matched the contents of the HEAD. This allows you to, for example, to distinguish between removing files that are in the HEAD but not in the index, vs just removing all untracked files. Because of various corner cases that arise, etc., this required some additional capabilities in rmdir and other utility functions. This includes the beginnings of an implementation of code to read a partial tree into the index based on a pathspec, but that is not enabled because of the possibility of creating conflicting index entries.
* Checkout progress now reports completed/total stepsBen Straub2012-10-191-1/+2
|
* Convert checkout_* to use progress callbackBen Straub2012-10-191-7/+2
|
* Convert checkout_index to use progress callbackBen Straub2012-10-191-3/+8
|
* errors: deploy GIT_EORPHANEDHEAD usagenulltoken2012-10-191-1/+2
|
* Merge pull request #968 from arrbee/diff-support-typechangeRussell Belfer2012-10-171-14/+31
|\ | | | | Support TYPECHANGE records in status and adjust checkout accordingly
| * Move enum comments next to actual valuesRussell Belfer2012-10-091-21/+23
| |
| * Add complex checkout test and then fix checkoutRussell Belfer2012-10-091-2/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This started as a complex new test for checkout going through the "typechanges" test repository, but that revealed numerous issues with checkout, including: * complete failure with submodules * failure to create blobs with exec bits * problems when replacing a tree with a blob because the tree "example/" sorts after the blob "example" so the delete was being processed after the single file blob was created This fixes most of those problems and includes a number of other minor changes that made it easier to do that, including improving the TYPECHANGE support in diff/status, etc.
* | Separated git_strarray from common.h. Added doxy comments.Paul Thompson2012-10-111-1/+1
|/
* checkout: add notification callback for skipped filesnulltoken2012-09-211-0/+15
|
* checkout: Mimic git_diff_options storage of pathsnulltoken2012-09-171-1/+1
|
* checkout: drop git_checkout_reference()nulltoken2012-09-171-16/+0
|
* checkout: segregate checkout strategiesnulltoken2012-09-171-4/+7
|
* checkout: introduce git_checkout_index()nulltoken2012-09-171-0/+14
|
* checkout: introduce git_checkout_tree()nulltoken2012-09-171-2/+27
|
* checkout: fix documentation code alignmentnulltoken2012-09-061-10/+12
|