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
b5a3ef3c
Unverified
Commit
b5a3ef3c
authored
Jan 20, 2019
by
Edward Thomson
Committed by
GitHub
Jan 20, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4944 from libgit2/ethomson/deprecation
Improve deprecation of old enums
parents
1758636b
1b2af79e
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
19 deletions
+20
-19
include/git2/common.h
+1
-0
include/git2/refs.h
+8
-8
include/git2/types.h
+11
-11
No files found.
include/git2/common.h
View file @
b5a3ef3c
...
@@ -59,6 +59,7 @@ typedef size_t size_t;
...
@@ -59,6 +59,7 @@ typedef size_t size_t;
#if defined(__GNUC__)
#if defined(__GNUC__)
# define GIT_DEPRECATED(func) \
# define GIT_DEPRECATED(func) \
__attribute__((deprecated)) \
__attribute__((deprecated)) \
__attribute__((used)) \
func
func
#elif defined(_MSC_VER)
#elif defined(_MSC_VER)
# define GIT_DEPRECATED(func) __declspec(deprecated) func
# define GIT_DEPRECATED(func) __declspec(deprecated) func
...
...
include/git2/refs.h
View file @
b5a3ef3c
...
@@ -762,18 +762,18 @@ GIT_EXTERN(const char *) git_reference_shorthand(const git_reference *ref);
...
@@ -762,18 +762,18 @@ GIT_EXTERN(const char *) git_reference_shorthand(const git_reference *ref);
#define git_ref_t git_reference_t
#define git_ref_t git_reference_t
#define git_reference_normalize_t git_reference_format_t
#define git_reference_normalize_t git_reference_format_t
GIT_DEPRECATED
(
static
const
unsigned
in
t
)
GIT_REF_INVALID
=
GIT_REFERENCE_INVALID
;
GIT_DEPRECATED
(
static
const
git_ref_
t
)
GIT_REF_INVALID
=
GIT_REFERENCE_INVALID
;
GIT_DEPRECATED
(
static
const
unsigned
in
t
)
GIT_REF_OID
=
GIT_REFERENCE_DIRECT
;
GIT_DEPRECATED
(
static
const
git_ref_
t
)
GIT_REF_OID
=
GIT_REFERENCE_DIRECT
;
GIT_DEPRECATED
(
static
const
unsigned
in
t
)
GIT_REF_SYMBOLIC
=
GIT_REFERENCE_SYMBOLIC
;
GIT_DEPRECATED
(
static
const
git_ref_
t
)
GIT_REF_SYMBOLIC
=
GIT_REFERENCE_SYMBOLIC
;
GIT_DEPRECATED
(
static
const
unsigned
in
t
)
GIT_REF_LISTALL
=
GIT_REFERENCE_ALL
;
GIT_DEPRECATED
(
static
const
git_ref_
t
)
GIT_REF_LISTALL
=
GIT_REFERENCE_ALL
;
GIT_DEPRECATED
(
static
const
unsigned
in
t
)
GIT_REF_FORMAT_NORMAL
=
GIT_DEPRECATED
(
static
const
git_reference_normalize_
t
)
GIT_REF_FORMAT_NORMAL
=
GIT_REFERENCE_FORMAT_NORMAL
;
GIT_REFERENCE_FORMAT_NORMAL
;
GIT_DEPRECATED
(
static
const
unsigned
in
t
)
GIT_REF_FORMAT_ALLOW_ONELEVEL
=
GIT_DEPRECATED
(
static
const
git_reference_normalize_
t
)
GIT_REF_FORMAT_ALLOW_ONELEVEL
=
GIT_REFERENCE_FORMAT_ALLOW_ONELEVEL
;
GIT_REFERENCE_FORMAT_ALLOW_ONELEVEL
;
GIT_DEPRECATED
(
static
const
unsigned
in
t
)
GIT_REF_FORMAT_REFSPEC_PATTERN
=
GIT_DEPRECATED
(
static
const
git_reference_normalize_
t
)
GIT_REF_FORMAT_REFSPEC_PATTERN
=
GIT_REFERENCE_FORMAT_REFSPEC_PATTERN
;
GIT_REFERENCE_FORMAT_REFSPEC_PATTERN
;
GIT_DEPRECATED
(
static
const
unsigned
in
t
)
GIT_REF_FORMAT_REFSPEC_SHORTHAND
=
GIT_DEPRECATED
(
static
const
git_reference_normalize_
t
)
GIT_REF_FORMAT_REFSPEC_SHORTHAND
=
GIT_REFERENCE_FORMAT_REFSPEC_SHORTHAND
;
GIT_REFERENCE_FORMAT_REFSPEC_SHORTHAND
;
/**@}*/
/**@}*/
...
...
include/git2/types.h
View file @
b5a3ef3c
...
@@ -450,19 +450,19 @@ typedef struct git_mailmap git_mailmap;
...
@@ -450,19 +450,19 @@ typedef struct git_mailmap git_mailmap;
/**@{*/
/**@{*/
GIT_DEPRECATED
(
static
const
int
)
GIT_OBJ_ANY
=
GIT_OBJECT_ANY
;
GIT_DEPRECATED
(
static
const
int
)
GIT_OBJ_BAD
=
GIT_OBJECT_INVALID
;
GIT_DEPRECATED
(
static
const
int
)
GIT_OBJ__EXT1
=
0
;
GIT_DEPRECATED
(
static
const
int
)
GIT_OBJ_COMMIT
=
GIT_OBJECT_COMMIT
;
GIT_DEPRECATED
(
static
const
int
)
GIT_OBJ_TREE
=
GIT_OBJECT_TREE
;
GIT_DEPRECATED
(
static
const
int
)
GIT_OBJ_BLOB
=
GIT_OBJECT_BLOB
;
GIT_DEPRECATED
(
static
const
int
)
GIT_OBJ_TAG
=
GIT_OBJECT_TAG
;
GIT_DEPRECATED
(
static
const
int
)
GIT_OBJ__EXT2
=
5
;
GIT_DEPRECATED
(
static
const
int
)
GIT_OBJ_OFS_DELTA
=
GIT_OBJECT_OFS_DELTA
;
GIT_DEPRECATED
(
static
const
int
)
GIT_OBJ_REF_DELTA
=
GIT_OBJECT_REF_DELTA
;
#define git_otype git_object_t
#define git_otype git_object_t
GIT_DEPRECATED
(
static
const
git_otype
)
GIT_OBJ_ANY
=
GIT_OBJECT_ANY
;
GIT_DEPRECATED
(
static
const
git_otype
)
GIT_OBJ_BAD
=
GIT_OBJECT_INVALID
;
GIT_DEPRECATED
(
static
const
git_otype
)
GIT_OBJ__EXT1
=
0
;
GIT_DEPRECATED
(
static
const
git_otype
)
GIT_OBJ_COMMIT
=
GIT_OBJECT_COMMIT
;
GIT_DEPRECATED
(
static
const
git_otype
)
GIT_OBJ_TREE
=
GIT_OBJECT_TREE
;
GIT_DEPRECATED
(
static
const
git_otype
)
GIT_OBJ_BLOB
=
GIT_OBJECT_BLOB
;
GIT_DEPRECATED
(
static
const
git_otype
)
GIT_OBJ_TAG
=
GIT_OBJECT_TAG
;
GIT_DEPRECATED
(
static
const
git_otype
)
GIT_OBJ__EXT2
=
5
;
GIT_DEPRECATED
(
static
const
git_otype
)
GIT_OBJ_OFS_DELTA
=
GIT_OBJECT_OFS_DELTA
;
GIT_DEPRECATED
(
static
const
git_otype
)
GIT_OBJ_REF_DELTA
=
GIT_OBJECT_REF_DELTA
;
/**@}*/
/**@}*/
/** @} */
/** @} */
...
...
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