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
8e398e4c
Commit
8e398e4c
authored
Oct 10, 2014
by
Arthur Schreiber
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Treat an empty list of refspecs the same as a NULL value.
parent
46a2b8e8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
include/git2/remote.h
+3
-3
src/remote.c
+1
-1
No files found.
include/git2/remote.h
View file @
8e398e4c
...
...
@@ -308,7 +308,7 @@ GIT_EXTERN(int) git_remote_ls(const git_remote_head ***out, size_t *size, git_r
*
* @param remote the remote
* @param refspecs the refspecs to use for this negotiation and
* download. Use NULL to use the base refspecs
* download. Use NULL
or an empty array
to use the base refspecs
* @return 0 or an error code
*/
GIT_EXTERN
(
int
)
git_remote_download
(
git_remote
*
remote
,
const
git_strarray
*
refspecs
);
...
...
@@ -376,8 +376,8 @@ GIT_EXTERN(int) git_remote_update_tips(
* disconnect and update the remote-tracking branches.
*
* @param remote the remote to fetch from
* @param refspecs the refspecs to use for this fetch. Pass NULL
to
* use the base refspecs.
* @param refspecs the refspecs to use for this fetch. Pass NULL
or an
*
empty array to
use the base refspecs.
* @param signature The identity to use when updating reflogs
* @param reflog_message The message to insert into the reflogs. If NULL, the
* default is "fetch"
...
...
src/remote.c
View file @
8e398e4c
...
...
@@ -834,7 +834,7 @@ int git_remote_download(git_remote *remote, const git_strarray *refspecs)
goto
on_error
;
remote
->
passed_refspecs
=
0
;
if
(
!
refspecs
)
{
if
(
!
refspecs
||
!
refspecs
->
count
)
{
to_active
=
&
remote
->
refspecs
;
}
else
{
for
(
i
=
0
;
i
<
refspecs
->
count
;
i
++
)
{
...
...
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