summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2019-03-28 20:35:17 -0700
committerGitHub <noreply@github.com>2019-03-28 20:35:17 -0700
commit675251d168e0c5a69a92d30171ad273f88a4d100 (patch)
treebd5238c4db2141963ab3dcf0ca2c62f9cac51041
parent7f1ba1969b0e78218691e726b9ef60e69fd77fa1 (diff)
parentbbba4805e742a81c27ede476cae897ad04af40e4 (diff)
downloadlibgit2-675251d168e0c5a69a92d30171ad273f88a4d100.tar.gz
Merge pull request #5032 from eaigner/checkout-force-safe-docfix
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),