summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@microsoft.com>2015-05-11 14:10:24 -0400
committerEdward Thomson <ethomson@microsoft.com>2015-05-11 14:13:31 -0400
commit1f1f5c639e7e7df3f0c65dbdbcc6b884041a8647 (patch)
tree0c41536f61ef7d421008982c7475ef1937c23d7c
parent15fdf0548f1c7a2783e1ac84383536065c1a50ae (diff)
downloadlibgit2-1f1f5c639e7e7df3f0c65dbdbcc6b884041a8647.tar.gz
checkout: better document the `baseline_index` opt
-rw-r--r--CHANGELOG.md3
-rw-r--r--include/git2/checkout.h10
2 files changed, 12 insertions, 1 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 3657906d6..d8bea9e15 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -34,6 +34,9 @@ v0.22 + 1
* On Mac OS X, we now use SecureTransport to provide the cryptographic
support for HTTPS connections insead of OpenSSL.
+* Checkout can now accept an index for the baseline computations via the
+ `baseline_index` member.
+
### API additions
* The `git_merge_options` gained a `file_flags` member.
diff --git a/include/git2/checkout.h b/include/git2/checkout.h
index 58f190719..6cf9ed8bd 100644
--- a/include/git2/checkout.h
+++ b/include/git2/checkout.h
@@ -272,7 +272,15 @@ typedef struct git_checkout_options {
*/
git_strarray paths;
- git_tree *baseline; /**< expected content of workdir, defaults to HEAD */
+ /** The expected content of the working directory; defaults to HEAD.
+ * If the working directory does not match this baseline information,
+ * that will produce a checkout conflict.
+ */
+ git_tree *baseline;
+
+ /** Like `baseline` above, though expressed as an index. This
+ * option overrides `baseline`.
+ */
git_index *baseline_index; /**< expected content of workdir, expressed as an index. */
const char *target_directory; /**< alternative checkout path to workdir */