summaryrefslogtreecommitdiff
path: root/include/git2
diff options
context:
space:
mode:
authorAlan Rogers <alan@github.com>2014-07-10 19:17:34 -0700
committerAlan Rogers <alan@github.com>2014-07-10 19:17:34 -0700
commit4edd1a036b3f181f871ab1fb57b01dcd5df67bac (patch)
tree0bee5e5542403bb533dbc029b24bdba95b5eff4f /include/git2
parent9e2d2f30deab2cad3d2cc6dbd5f498668d18572f (diff)
parent1589aa0c4d48fb130d8a5db28c45cd3d173cde6d (diff)
downloadlibgit2-4edd1a036b3f181f871ab1fb57b01dcd5df67bac.tar.gz
Merge remote-tracking branch 'origin/development' into fix-git-status-list-new-unreadable-folder
Diffstat (limited to 'include/git2')
-rw-r--r--include/git2/clone.h78
-rw-r--r--include/git2/pathspec.h3
-rw-r--r--include/git2/remote.h13
-rw-r--r--include/git2/version.h6
4 files changed, 72 insertions, 28 deletions
diff --git a/include/git2/clone.h b/include/git2/clone.h
index b2c944a78..05b7522ce 100644
--- a/include/git2/clone.h
+++ b/include/git2/clone.h
@@ -23,10 +23,31 @@
*/
GIT_BEGIN_DECL
+/**
+ * Options for bypassing the git-aware transport on clone. Bypassing
+ * it means that instead of a fetch, libgit2 will copy the object
+ * database directory instead of figuring out what it needs, which is
+ * faster. If possible, it will hardlink the files to save space.
+ */
typedef enum {
+ /**
+ * Auto-detect (default), libgit2 will bypass the git-aware
+ * transport for local paths, but use a normal fetch for
+ * `file://` urls.
+ */
GIT_CLONE_LOCAL_AUTO,
+ /**
+ * Bypass the git-aware transport even for a `file://` url.
+ */
GIT_CLONE_LOCAL,
+ /**
+ * Do no bypass the git-aware transport
+ */
GIT_CLONE_NO_LOCAL,
+ /**
+ * Bypass the git-aware transport, but do not try to use
+ * hardlinks.
+ */
GIT_CLONE_LOCAL_NO_LINKS,
} git_clone_local_t;
@@ -36,37 +57,58 @@ typedef enum {
* Use the GIT_CLONE_OPTIONS_INIT to get the default settings, like this:
*
* git_clone_options opts = GIT_CLONE_OPTIONS_INIT;
- *
- * - `checkout_opts` are option passed to the checkout step. To disable
- * checkout, set the `checkout_strategy` to GIT_CHECKOUT_NONE.
- * Generally you will want the use GIT_CHECKOUT_SAFE_CREATE to create
- * all files in the working directory for the newly cloned repository.
- * - `bare` should be set to zero (false) to create a standard repo,
- * or non-zero for a bare repo
- * - `ignore_cert_errors` should be set to 1 if errors validating the
- * remote host's certificate should be ignored.
- *
- * ** "origin" remote options: **
- *
- * - `remote_name` is the name to be given to the "origin" remote. The
- * default is "origin".
- * - `checkout_branch` gives the name of the branch to checkout. NULL
- * means use the remote's HEAD.
- * - `signature` is the identity used when updating the reflog. NULL means to
- * use the default signature using the config.
*/
typedef struct git_clone_options {
unsigned int version;
+ /**
+ * These options are passed to the checkout step. To disable
+ * checkout, set the `checkout_strategy` to
+ * `GIT_CHECKOUT_NONE`. Generally you will want the use
+ * GIT_CHECKOUT_SAFE_CREATE to create all files in the working
+ * directory for the newly cloned repository.
+ */
git_checkout_options checkout_opts;
+
+ /**
+ * Callbacks to use for reporting fetch progress.
+ */
git_remote_callbacks remote_callbacks;
+ /**
+ * Set to zero (false) to create a standard repo, or non-zero
+ * for a bare repo
+ */
int bare;
+
+ /**
+ * Set to 1 if errors validating the remote host's certificate
+ * should be ignored.
+ */
int ignore_cert_errors;
+
+ /**
+ * Whether to use a fetch or copy the object database.
+ */
git_clone_local_t local;
+
+ /**
+ * The name to be given to the remote that will be
+ * created. The default is "origin".
+ */
const char *remote_name;
+
+ /**
+ * The name of the branch to checkout. NULL means use the
+ * remote's default branch.
+ */
const char* checkout_branch;
+
+ /**
+ * The identity used when updating the reflog. NULL means to
+ * use the default signature using the config.
+ */
git_signature *signature;
} git_clone_options;
diff --git a/include/git2/pathspec.h b/include/git2/pathspec.h
index 2fb0bb716..de6f027c5 100644
--- a/include/git2/pathspec.h
+++ b/include/git2/pathspec.h
@@ -12,6 +12,8 @@
#include "strarray.h"
#include "diff.h"
+GIT_BEGIN_DECL
+
/**
* Compiled pathspec
*/
@@ -257,4 +259,5 @@ GIT_EXTERN(size_t) git_pathspec_match_list_failed_entrycount(
GIT_EXTERN(const char *) git_pathspec_match_list_failed_entry(
const git_pathspec_match_list *m, size_t pos);
+GIT_END_DECL
#endif
diff --git a/include/git2/remote.h b/include/git2/remote.h
index 28771ac42..c72c9c8cc 100644
--- a/include/git2/remote.h
+++ b/include/git2/remote.h
@@ -572,18 +572,17 @@ GIT_EXTERN(void) git_remote_set_autotag(
*
* A temporary in-memory remote cannot be given a name with this method.
*
+ * @param problems non-default refspecs cannot be renamed and will be
+ * stored here for further processing by the caller. Always free this
+ * strarray on succesful return.
* @param remote the remote to rename
* @param new_name the new name the remote should bear
- * @param callback Optional callback to notify the consumer of fetch refspecs
- * that haven't been automatically updated and need potential manual tweaking.
- * @param payload Additional data to pass to the callback
* @return 0, GIT_EINVALIDSPEC, GIT_EEXISTS or an error code
*/
GIT_EXTERN(int) git_remote_rename(
+ git_strarray *problems,
git_remote *remote,
- const char *new_name,
- git_remote_rename_problem_cb callback,
- void *payload);
+ const char *new_name);
/**
* Retrieve the update FETCH_HEAD setting.
@@ -616,8 +615,6 @@ GIT_EXTERN(int) git_remote_is_valid_name(const char *remote_name);
* All remote-tracking branches and configuration settings
* for the remote will be removed.
*
-* once deleted, the passed remote object will be freed and invalidated.
-*
* @param remote A valid remote
* @return 0 on success, or an error code.
*/
diff --git a/include/git2/version.h b/include/git2/version.h
index c4c5e8eb1..5bda42735 100644
--- a/include/git2/version.h
+++ b/include/git2/version.h
@@ -7,9 +7,11 @@
#ifndef INCLUDE_git_version_h__
#define INCLUDE_git_version_h__
-#define LIBGIT2_VERSION "0.20.0"
+#define LIBGIT2_VERSION "0.21.0"
#define LIBGIT2_VER_MAJOR 0
-#define LIBGIT2_VER_MINOR 20
+#define LIBGIT2_VER_MINOR 21
#define LIBGIT2_VER_REVISION 0
+#define LIBGIT2_SOVERSION 21
+
#endif