diff options
| author | Russell Belfer <rb@github.com> | 2012-12-10 15:31:43 -0800 |
|---|---|---|
| committer | Russell Belfer <rb@github.com> | 2013-01-04 15:47:42 -0800 |
| commit | 7e5c8a5b41ca660def7de23fd32b942878a6ee24 (patch) | |
| tree | 477e12bfca0e05c6458ee7bcb25f235ced2714c0 /src/checkout.h | |
| parent | cf208031705388a2d1907fb9ec409ff22179f380 (diff) | |
| download | libgit2-7e5c8a5b41ca660def7de23fd32b942878a6ee24.tar.gz | |
More checkout improvements
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.
Diffstat (limited to 'src/checkout.h')
| -rw-r--r-- | src/checkout.h | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/src/checkout.h b/src/checkout.h index 651b0033f..815abdfed 100644 --- a/src/checkout.h +++ b/src/checkout.h @@ -10,22 +10,15 @@ #include "git2/checkout.h" #include "iterator.h" -#define GIT_CHECKOUT__FREE_BASELINE (1u << 24) +#define GIT_CHECKOUT__NOTIFY_CONFLICT_TREE (1u << 12) /** - * Given a working directory which is expected to match the contents - * of iterator "expected", this will make the directory match the - * contents of "desired" according to the rules in the checkout "opts". - * - * Because the iterators for the desired and expected values were already - * created when this is invoked, if the checkout opts `paths` is in play, - * then presumably the pathspec_pfx was already computed, so it should be - * passed in to prevent reallocation. + * Update the working directory to match the target iterator. The + * expected baseline value can be passed in via the checkout options + * or else will default to the HEAD commit. */ -extern int git_checkout__from_iterators( - git_iterator *desired, - git_iterator *expected, - git_checkout_opts *opts, - const char *pathspec_pfx); +extern int git_checkout_iterator( + git_iterator *target, + git_checkout_opts *opts); #endif |
