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
c7143d7c
Commit
c7143d7c
authored
Oct 11, 2020
by
Edward Thomson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remote: deprecate git_remote_is_valid_name
parent
55a7117d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
16 deletions
+35
-16
include/git2/deprecated.h
+21
-0
include/git2/remote.h
+0
-8
src/remote.c
+14
-8
No files found.
include/git2/deprecated.h
View file @
c7143d7c
...
@@ -340,6 +340,27 @@ GIT_EXTERN(size_t) git_object__size(git_object_t type);
...
@@ -340,6 +340,27 @@ GIT_EXTERN(size_t) git_object__size(git_object_t type);
/**@}*/
/**@}*/
/** @name Deprecated Remote Functions
*
* These functions are retained for backward compatibility. The newer
* versions of these functions should be preferred in all new code.
*
* There is no plan to remove these backward compatibility functions at
* this time.
*/
/**@{*/
/**
* Ensure the remote name is well-formed.
*
* @deprecated Use git_remote_name_is_valid
* @param remote_name name to be checked.
* @return 1 if the reference name is acceptable; 0 if it isn't
*/
GIT_EXTERN
(
int
)
git_remote_is_valid_name
(
const
char
*
remote_name
);
/**@}*/
/** @name Deprecated Reference Functions and Constants
/** @name Deprecated Reference Functions and Constants
*
*
* These functions and enumeration values are retained for backward
* These functions and enumeration values are retained for backward
...
...
include/git2/remote.h
View file @
c7143d7c
...
@@ -922,14 +922,6 @@ GIT_EXTERN(int) git_remote_rename(
...
@@ -922,14 +922,6 @@ GIT_EXTERN(int) git_remote_rename(
int
git_remote_name_is_valid
(
int
*
valid
,
const
char
*
remote_name
);
int
git_remote_name_is_valid
(
int
*
valid
,
const
char
*
remote_name
);
/**
/**
* Ensure the remote name is well-formed.
*
* @param remote_name name to be checked.
* @return 1 if the reference name is acceptable; 0 if it isn't
*/
GIT_EXTERN
(
int
)
git_remote_is_valid_name
(
const
char
*
remote_name
);
/**
* Delete an existing persisted remote.
* Delete an existing persisted remote.
*
*
* All remote-tracking branches and configuration settings
* All remote-tracking branches and configuration settings
...
...
src/remote.c
View file @
c7143d7c
...
@@ -2124,14 +2124,6 @@ done:
...
@@ -2124,14 +2124,6 @@ done:
return
error
;
return
error
;
}
}
int
git_remote_is_valid_name
(
const
char
*
remote_name
)
{
int
valid
=
0
;
git_remote_name_is_valid
(
&
valid
,
remote_name
);
return
valid
;
}
git_refspec
*
git_remote__matching_refspec
(
git_remote
*
remote
,
const
char
*
refname
)
git_refspec
*
git_remote__matching_refspec
(
git_remote
*
remote
,
const
char
*
refname
)
{
{
git_refspec
*
spec
;
git_refspec
*
spec
;
...
@@ -2628,3 +2620,17 @@ char *apply_insteadof(git_config *config, const char *url, int direction)
...
@@ -2628,3 +2620,17 @@ char *apply_insteadof(git_config *config, const char *url, int direction)
return
result
.
ptr
;
return
result
.
ptr
;
}
}
/* Deprecated functions */
#ifndef GIT_DEPRECATE_HARD
int
git_remote_is_valid_name
(
const
char
*
remote_name
)
{
int
valid
=
0
;
git_remote_name_is_valid
(
&
valid
,
remote_name
);
return
valid
;
}
#endif
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