Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
git2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
git2
Commits
7283daa8
Commit
7283daa8
authored
Oct 01, 2018
by
Etienne Samson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
doc: small fixups & additions
parent
b3e6ef92
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
58 additions
and
19 deletions
+58
-19
include/git2/checkout.h
+1
-1
include/git2/config.h
+15
-5
include/git2/transport.h
+42
-13
No files found.
include/git2/checkout.h
View file @
7283daa8
...
@@ -67,7 +67,7 @@ GIT_BEGIN_DECL
...
@@ -67,7 +67,7 @@ GIT_BEGIN_DECL
* To emulate `git checkout -f`, use `GIT_CHECKOUT_FORCE`.
* To emulate `git checkout -f`, use `GIT_CHECKOUT_FORCE`.
*
*
*
*
* There are some additional flags to modif
ied
the behavior of checkout:
* There are some additional flags to modif
y
the behavior of checkout:
*
*
* - GIT_CHECKOUT_ALLOW_CONFLICTS makes SAFE mode apply safe file updates
* - GIT_CHECKOUT_ALLOW_CONFLICTS makes SAFE mode apply safe file updates
* even if there are conflicts (instead of cancelling the checkout).
* even if there are conflicts (instead of cancelling the checkout).
...
...
include/git2/config.h
View file @
7283daa8
...
@@ -75,7 +75,17 @@ typedef struct git_config_entry {
...
@@ -75,7 +75,17 @@ typedef struct git_config_entry {
*/
*/
GIT_EXTERN
(
void
)
git_config_entry_free
(
git_config_entry
*
);
GIT_EXTERN
(
void
)
git_config_entry_free
(
git_config_entry
*
);
typedef
int
(
*
git_config_foreach_cb
)(
const
git_config_entry
*
,
void
*
);
/**
* A config enumeration callback
*
* @param entry the entry currently being enumerated
* @param payload a user-specified pointer
*/
typedef
int
(
*
git_config_foreach_cb
)(
const
git_config_entry
*
entry
,
void
*
payload
);
/**
* An opaque structure for a configuration iterator
*/
typedef
struct
git_config_iterator
git_config_iterator
;
typedef
struct
git_config_iterator
git_config_iterator
;
/**
/**
...
@@ -581,7 +591,7 @@ GIT_EXTERN(int) git_config_iterator_glob_new(git_config_iterator **out, const gi
...
@@ -581,7 +591,7 @@ GIT_EXTERN(int) git_config_iterator_glob_new(git_config_iterator **out, const gi
/**
/**
* Perform an operation on each config variable matching a regular expression.
* Perform an operation on each config variable matching a regular expression.
*
*
* This behav
ior
s like `git_config_foreach` with an additional filter of a
* This behav
e
s like `git_config_foreach` with an additional filter of a
* regular expression that filters which config keys are passed to the
* regular expression that filters which config keys are passed to the
* callback.
* callback.
*
*
...
@@ -711,11 +721,11 @@ GIT_EXTERN(int) git_config_parse_int64(int64_t *out, const char *value);
...
@@ -711,11 +721,11 @@ GIT_EXTERN(int) git_config_parse_int64(int64_t *out, const char *value);
GIT_EXTERN
(
int
)
git_config_parse_path
(
git_buf
*
out
,
const
char
*
value
);
GIT_EXTERN
(
int
)
git_config_parse_path
(
git_buf
*
out
,
const
char
*
value
);
/**
/**
* Perform an operation on each config variable in
given config backend
* Perform an operation on each config variable in
a given config backend,
* matching a regular expression.
* matching a regular expression.
*
*
* This behav
iors like `git_config_foreach_match` except instead of all
config
* This behav
es like `git_config_foreach_match` except that only
config
* entries
it just enumerates through the given backend entry
.
* entries
from the given backend entry are enumerated
.
*
*
* The regular expression is applied case-sensitively on the normalized form of
* The regular expression is applied case-sensitively on the normalized form of
* the variable name: the section and variable parts are lower-cased. The
* the variable name: the section and variable parts are lower-cased. The
...
...
include/git2/transport.h
View file @
7283daa8
...
@@ -77,44 +77,73 @@ typedef struct {
...
@@ -77,44 +77,73 @@ typedef struct {
*** Begin interface for credentials acquisition ***
*** Begin interface for credentials acquisition ***
*/
*/
/** Authentication type requested */
/**
* Supported credential types
*
* This represents the various types of authentication methods supported by
* the library.
*/
typedef
enum
{
typedef
enum
{
/* git_cred_userpass_plaintext */
/**
* A vanilla user/password request
* @see git_cred_userpass_plaintext_new
*/
GIT_CREDTYPE_USERPASS_PLAINTEXT
=
(
1u
<<
0
),
GIT_CREDTYPE_USERPASS_PLAINTEXT
=
(
1u
<<
0
),
/* git_cred_ssh_key */
/**
* An SSH key-based authentication request
* @see git_cred_ssh_key_new
*/
GIT_CREDTYPE_SSH_KEY
=
(
1u
<<
1
),
GIT_CREDTYPE_SSH_KEY
=
(
1u
<<
1
),
/* git_cred_ssh_custom */
/**
* An SSH key-based authentication request, with a custom signature
* @see git_cred_ssh_custom_new
*/
GIT_CREDTYPE_SSH_CUSTOM
=
(
1u
<<
2
),
GIT_CREDTYPE_SSH_CUSTOM
=
(
1u
<<
2
),
/* git_cred_default */
/**
* An NTLM/Negotiate-based authentication request.
* @see git_cred_default
*/
GIT_CREDTYPE_DEFAULT
=
(
1u
<<
3
),
GIT_CREDTYPE_DEFAULT
=
(
1u
<<
3
),
/* git_cred_ssh_interactive */
/**
* An SSH interactive authentication request
* @see git_cred_ssh_interactive_new
*/
GIT_CREDTYPE_SSH_INTERACTIVE
=
(
1u
<<
4
),
GIT_CREDTYPE_SSH_INTERACTIVE
=
(
1u
<<
4
),
/**
/**
* Username-only
information
* Username-only
authentication request
*
*
* If the SSH transport does not know which username to use,
* Used as a pre-authentication step if the underlying transport
* it will ask via this credential type.
* (eg. SSH, with no username in its URL) does not know which username
* to use.
*
* @see git_cred_username_new
*/
*/
GIT_CREDTYPE_USERNAME
=
(
1u
<<
5
),
GIT_CREDTYPE_USERNAME
=
(
1u
<<
5
),
/**
/**
* Credentials read from memory.
* An SSH key-based authentication request
*
* Allows credentials to be read from memory instead of files.
* Note that because of differences in crypto backend support, it might
* not be functional.
*
*
*
Only available for libssh2+OpenSSL for now.
*
@see git_cred_ssh_key_memory_new
*/
*/
GIT_CREDTYPE_SSH_MEMORY
=
(
1u
<<
6
),
GIT_CREDTYPE_SSH_MEMORY
=
(
1u
<<
6
),
}
git_credtype_t
;
}
git_credtype_t
;
/* The base structure for all credential types */
typedef
struct
git_cred
git_cred
;
typedef
struct
git_cred
git_cred
;
/**
* The base structure for all credential types
*/
struct
git_cred
{
struct
git_cred
{
git_credtype_t
credtype
;
git_credtype_t
credtype
;
/**< A type of credential */
void
(
*
free
)(
git_cred
*
cred
);
void
(
*
free
)(
git_cred
*
cred
);
};
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment