diff options
author | Russell Belfer <rb@github.com> | 2014-04-30 10:57:42 -0700 |
---|---|---|
committer | Russell Belfer <rb@github.com> | 2014-05-02 09:21:33 -0700 |
commit | 702efc891f2a620f10998062ba0c00b34100f632 (patch) | |
tree | e80132037df687837a40b5c3d8f1d6a079d35e43 /include/git2/clone.h | |
parent | 9c8ed4999740e921ecc2966bbcd0dbcfc725f59a (diff) | |
download | libgit2-702efc891f2a620f10998062ba0c00b34100f632.tar.gz |
Make init_options fns use unsigned ints and macro
Use an unsigned int for the version and add a helper macro so the
code is simplified (and so the error message is a common string).
Diffstat (limited to 'include/git2/clone.h')
-rw-r--r-- | include/git2/clone.h | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/include/git2/clone.h b/include/git2/clone.h index 20be1a105..985c04bf6 100644 --- a/include/git2/clone.h +++ b/include/git2/clone.h @@ -66,17 +66,16 @@ typedef struct git_clone_options { #define GIT_CLONE_OPTIONS_INIT {GIT_CLONE_OPTIONS_VERSION, {GIT_CHECKOUT_OPTIONS_VERSION, GIT_CHECKOUT_SAFE_CREATE}, GIT_REMOTE_CALLBACKS_INIT} /** -* Initializes a `git_clone_options` with default values. Equivalent to -* creating an instance with GIT_CLONE_OPTIONS_INIT. -* -* @param opts the `git_clone_options` instance to initialize. -* @param version the version of the struct; you should pass -* `GIT_CLONE_OPTIONS_VERSION` here. -* @return Zero on success; -1 on failure. -*/ + * Initializes a `git_clone_options` with default values. Equivalent to + * creating an instance with GIT_CLONE_OPTIONS_INIT. + * + * @param opts The `git_clone_options` struct to initialize + * @param version Version of struct; pass `GIT_CLONE_OPTIONS_VERSION` + * @return Zero on success; -1 on failure. + */ GIT_EXTERN(int) git_clone_init_options( - git_clone_options* opts, - int version); + git_clone_options *opts, + unsigned int version); /** * Clone a remote repository. |