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
8d39f2a7
Commit
8d39f2a7
authored
Apr 30, 2013
by
Carlos Martín Nieto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refspec: add direction accessor
parent
41578510
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
0 deletions
+15
-0
include/git2/refspec.h
+8
-0
src/refspec.c
+7
-0
No files found.
include/git2/refspec.h
View file @
8d39f2a7
...
@@ -52,6 +52,14 @@ GIT_EXTERN(const char *) git_refspec_string(const git_refspec *refspec);
...
@@ -52,6 +52,14 @@ GIT_EXTERN(const char *) git_refspec_string(const git_refspec *refspec);
GIT_EXTERN
(
int
)
git_refspec_force
(
const
git_refspec
*
refspec
);
GIT_EXTERN
(
int
)
git_refspec_force
(
const
git_refspec
*
refspec
);
/**
/**
* Get the refspec's direction.
*
* @param the refspec
* @return GIT_DIRECTION_FETCH or GIT_DIRECTION_PUSH
*/
GIT_EXTERN
(
git_direction
)
git_refspec_direction
(
const
git_refspec
*
spec
);
/**
* Check if a refspec's source descriptor matches a reference
* Check if a refspec's source descriptor matches a reference
*
*
* @param refspec the refspec
* @param refspec the refspec
...
...
src/refspec.c
View file @
8d39f2a7
...
@@ -274,3 +274,10 @@ int git_refspec_is_wildcard(const git_refspec *spec)
...
@@ -274,3 +274,10 @@ int git_refspec_is_wildcard(const git_refspec *spec)
return
(
spec
->
src
[
strlen
(
spec
->
src
)
-
1
]
==
'*'
);
return
(
spec
->
src
[
strlen
(
spec
->
src
)
-
1
]
==
'*'
);
}
}
git_direction
git_refspec_direction
(
const
git_refspec
*
spec
)
{
assert
(
spec
);
return
spec
->
push
;
}
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