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
f4a62c30
Commit
f4a62c30
authored
Nov 27, 2012
by
Ben Straub
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Typedef enums.
parent
1d8ec670
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
15 deletions
+17
-15
include/git2/remote.h
+6
-4
include/git2/repository.h
+5
-5
src/remote.c
+2
-2
src/remote.h
+4
-4
No files found.
include/git2/remote.h
View file @
f4a62c30
...
...
@@ -360,12 +360,12 @@ GIT_EXTERN(void) git_remote_set_callbacks(git_remote *remote, git_remote_callbac
*/
GIT_EXTERN
(
const
git_transfer_progress
*
)
git_remote_stats
(
git_remote
*
remote
);
enum
{
typedef
enum
{
GIT_REMOTE_DOWNLOAD_TAGS_UNSET
,
GIT_REMOTE_DOWNLOAD_TAGS_NONE
,
GIT_REMOTE_DOWNLOAD_TAGS_AUTO
,
GIT_REMOTE_DOWNLOAD_TAGS_ALL
};
}
git_remote_autotag_option_t
;
/**
* Retrieve the tag auto-follow setting
...
...
@@ -373,7 +373,7 @@ enum {
* @param remote the remote to query
* @return the auto-follow setting
*/
GIT_EXTERN
(
in
t
)
git_remote_autotag
(
git_remote
*
remote
);
GIT_EXTERN
(
git_remote_autotag_option_
t
)
git_remote_autotag
(
git_remote
*
remote
);
/**
* Set the tag auto-follow setting
...
...
@@ -381,7 +381,9 @@ GIT_EXTERN(int) git_remote_autotag(git_remote *remote);
* @param remote the remote to configure
* @param value a GIT_REMOTE_DOWNLOAD_TAGS value
*/
GIT_EXTERN
(
void
)
git_remote_set_autotag
(
git_remote
*
remote
,
int
value
);
GIT_EXTERN
(
void
)
git_remote_set_autotag
(
git_remote
*
remote
,
git_remote_autotag_option_t
value
);
/**
* Give the remote a new name
...
...
include/git2/repository.h
View file @
f4a62c30
...
...
@@ -98,7 +98,7 @@ GIT_EXTERN(int) git_repository_discover(
typedef
enum
{
GIT_REPOSITORY_OPEN_NO_SEARCH
=
(
1
<<
0
),
GIT_REPOSITORY_OPEN_CROSS_FS
=
(
1
<<
1
),
}
git_repository_open_flag
s
;
}
git_repository_open_flag
_t
;
/**
* Find and open a repository with extended controls.
...
...
@@ -182,14 +182,14 @@ GIT_EXTERN(int) git_repository_init(
* `init.templatedir` global config if not, or falling back on
* "/usr/share/git-core/templates" if it exists.
*/
enum
{
typedef
enum
{
GIT_REPOSITORY_INIT_BARE
=
(
1u
<<
0
),
GIT_REPOSITORY_INIT_NO_REINIT
=
(
1u
<<
1
),
GIT_REPOSITORY_INIT_NO_DOTGIT_DIR
=
(
1u
<<
2
),
GIT_REPOSITORY_INIT_MKDIR
=
(
1u
<<
3
),
GIT_REPOSITORY_INIT_MKPATH
=
(
1u
<<
4
),
GIT_REPOSITORY_INIT_EXTERNAL_TEMPLATE
=
(
1u
<<
5
),
};
}
git_repository_init_flag_t
;
/**
* Mode options for `git_repository_init_ext`.
...
...
@@ -204,11 +204,11 @@ enum {
* * SHARED_ALL - Use "--shared=all" behavior, adding world readability.
* * Anything else - Set to custom value.
*/
enum
{
typedef
enum
{
GIT_REPOSITORY_INIT_SHARED_UMASK
=
0
,
GIT_REPOSITORY_INIT_SHARED_GROUP
=
0002775
,
GIT_REPOSITORY_INIT_SHARED_ALL
=
0002777
,
};
}
git_repository_init_mode_t
;
/**
* Extended options structure for `git_repository_init_ext`.
...
...
src/remote.c
View file @
f4a62c30
...
...
@@ -967,12 +967,12 @@ const git_transfer_progress* git_remote_stats(git_remote *remote)
return
&
remote
->
stats
;
}
in
t
git_remote_autotag
(
git_remote
*
remote
)
git_remote_autotag_option_
t
git_remote_autotag
(
git_remote
*
remote
)
{
return
remote
->
download_tags
;
}
void
git_remote_set_autotag
(
git_remote
*
remote
,
in
t
value
)
void
git_remote_set_autotag
(
git_remote
*
remote
,
git_remote_autotag_option_
t
value
)
{
remote
->
download_tags
=
value
;
}
...
...
src/remote.h
View file @
f4a62c30
...
...
@@ -27,10 +27,10 @@ struct git_remote {
git_repository
*
repo
;
git_remote_callbacks
callbacks
;
git_transfer_progress
stats
;
unsigned
int
need_pack
:
1
,
download_tags
:
2
,
/* There are four possible values */
check_cert
:
1
,
update_fetchhead
:
1
;
unsigned
int
need_pack
;
git_remote_autotag_option_t
download_tags
;
unsigned
int
check_cert
;
unsigned
int
update_fetchhead
;
};
const
char
*
git_remote__urlfordirection
(
struct
git_remote
*
remote
,
int
direction
);
...
...
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