summaryrefslogtreecommitdiff
path: root/include/git2/checkout.h
diff options
context:
space:
mode:
authorVicent Marti <tanoku@gmail.com>2013-11-20 12:54:24 +0100
committerVicent Marti <tanoku@gmail.com>2013-11-20 12:54:24 +0100
commit4b0a36e881506a02b43a4ae3c19c93c919b36eeb (patch)
tree026182fa30273a4c1649928b6db3fc5335bd1ea4 /include/git2/checkout.h
parent29d7242b1dcd1f09a63417abd648a6217b85d301 (diff)
parent43cb8b32428b1b29994874349ec22eb5372e152c (diff)
downloadlibgit2-4b0a36e881506a02b43a4ae3c19c93c919b36eeb.tar.gz
Merge branch 'development'
Diffstat (limited to 'include/git2/checkout.h')
-rw-r--r--include/git2/checkout.h27
1 files changed, 15 insertions, 12 deletions
diff --git a/include/git2/checkout.h b/include/git2/checkout.h
index a086408c7..efafdc3e4 100644
--- a/include/git2/checkout.h
+++ b/include/git2/checkout.h
@@ -131,6 +131,13 @@ typedef enum {
/** Don't refresh index/config/etc before doing checkout */
GIT_CHECKOUT_NO_REFRESH = (1u << 9),
+ /** Allow checkout to skip unmerged files */
+ GIT_CHECKOUT_SKIP_UNMERGED = (1u << 10),
+ /** For unmerged files, checkout stage 2 from index */
+ GIT_CHECKOUT_USE_OURS = (1u << 11),
+ /** For unmerged files, checkout stage 3 from index */
+ GIT_CHECKOUT_USE_THEIRS = (1u << 12),
+
/** Treat pathspec as simple list of exact match file paths */
GIT_CHECKOUT_DISABLE_PATHSPEC_MATCH = (1u << 13),
@@ -141,13 +148,6 @@ typedef enum {
* THE FOLLOWING OPTIONS ARE NOT YET IMPLEMENTED
*/
- /** Allow checkout to skip unmerged files (NOT IMPLEMENTED) */
- GIT_CHECKOUT_SKIP_UNMERGED = (1u << 10),
- /** For unmerged files, checkout stage 2 from index (NOT IMPLEMENTED) */
- GIT_CHECKOUT_USE_OURS = (1u << 11),
- /** For unmerged files, checkout stage 3 from index (NOT IMPLEMENTED) */
- GIT_CHECKOUT_USE_THEIRS = (1u << 12),
-
/** Recursively checkout submodules with same options (NOT IMPLEMENTED) */
GIT_CHECKOUT_UPDATE_SUBMODULES = (1u << 16),
/** Recursively checkout submodules if HEAD moved in super repo (NOT IMPLEMENTED) */
@@ -238,6 +238,9 @@ typedef struct git_checkout_opts {
git_tree *baseline; /** expected content of workdir, defaults to HEAD */
const char *target_directory; /** alternative checkout path to workdir */
+
+ const char *our_label; /** the name of the "our" side of conflicts */
+ const char *their_label; /** the name of the "their" side of conflicts */
} git_checkout_opts;
#define GIT_CHECKOUT_OPTS_VERSION 1
@@ -249,13 +252,13 @@ typedef struct git_checkout_opts {
*
* @param repo repository to check out (must be non-bare)
* @param opts specifies checkout options (may be NULL)
- * @return 0 on success, GIT_EORPHANEDHEAD when HEAD points to a non existing
+ * @return 0 on success, GIT_EUNBORNBRANCH when HEAD points to a non existing
* branch, GIT_ERROR otherwise (use giterr_last for information
* about the error)
*/
GIT_EXTERN(int) git_checkout_head(
git_repository *repo,
- git_checkout_opts *opts);
+ const git_checkout_opts *opts);
/**
* Updates files in the working tree to match the content of the index.
@@ -269,7 +272,7 @@ GIT_EXTERN(int) git_checkout_head(
GIT_EXTERN(int) git_checkout_index(
git_repository *repo,
git_index *index,
- git_checkout_opts *opts);
+ const git_checkout_opts *opts);
/**
* Updates files in the index and working tree to match the content of the
@@ -277,7 +280,7 @@ GIT_EXTERN(int) git_checkout_index(
*
* @param repo repository to check out (must be non-bare)
* @param treeish a commit, tag or tree which content will be used to update
- * the working directory
+ * the working directory (or NULL to use HEAD)
* @param opts specifies checkout options (may be NULL)
* @return 0 on success, GIT_ERROR otherwise (use giterr_last for information
* about the error)
@@ -285,7 +288,7 @@ GIT_EXTERN(int) git_checkout_index(
GIT_EXTERN(int) git_checkout_tree(
git_repository *repo,
const git_object *treeish,
- git_checkout_opts *opts);
+ const git_checkout_opts *opts);
/** @} */
GIT_END_DECL