summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErik Aigner <aigner.erik@gmail.com>2019-03-25 20:45:58 +0100
committerErik Aigner <aigner.erik@gmail.com>2019-03-25 20:47:10 +0100
commitbbba4805e742a81c27ede476cae897ad04af40e4 (patch)
tree8c5cd211b1f6168696b449fb8bee8c506ef929be
parent966b944095edf9910a332bb73249b5d7d6ebeb2f (diff)
downloadlibgit2-bbba4805e742a81c27ede476cae897ad04af40e4.tar.gz
docs: clarify relation of safe and forced checkout strategy
-rw-r--r--include/git2/checkout.h16
1 files changed, 14 insertions, 2 deletions
diff --git a/include/git2/checkout.h b/include/git2/checkout.h
index 3fb3fc127..e49111c5d 100644
--- a/include/git2/checkout.h
+++ b/include/git2/checkout.h
@@ -106,10 +106,22 @@ GIT_BEGIN_DECL
typedef enum {
GIT_CHECKOUT_NONE = 0, /**< default is a dry run, no actual updates */
- /** Allow safe updates that cannot overwrite uncommitted data */
+ /**
+ * Allow safe updates that cannot overwrite uncommitted data.
+ * If the uncommitted changes don't conflict with the checked out files,
+ * the checkout will still proceed, leaving the changes intact.
+ *
+ * Mutually exclusive with GIT_CHECKOUT_FORCE.
+ * GIT_CHECKOUT_FORCE takes precedence over GIT_CHECKOUT_SAFE.
+ */
GIT_CHECKOUT_SAFE = (1u << 0),
- /** Allow all updates to force working directory to look like index */
+ /**
+ * Allow all updates to force working directory to look like index.
+ *
+ * Mutually exclusive with GIT_CHECKOUT_SAFE.
+ * GIT_CHECKOUT_FORCE takes precedence over GIT_CHECKOUT_SAFE.
+ */
GIT_CHECKOUT_FORCE = (1u << 1),