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
ac77d306
Unverified
Commit
ac77d306
authored
Apr 13, 2021
by
Edward Thomson
Committed by
GitHub
Apr 13, 2021
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #5834 from libgit2/cmn/repo-no-passthrough
repo: remove an inappropriate use of PASSTHROUGH
parents
d05eda87
6591deef
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
11 deletions
+9
-11
src/repository.c
+9
-11
No files found.
src/repository.c
View file @
ac77d306
...
...
@@ -2354,21 +2354,19 @@ int git_repository_head_unborn(git_repository *repo)
return
0
;
}
static
int
at_least_one_cb
(
const
char
*
refname
,
void
*
payload
)
{
GIT_UNUSED
(
refname
);
GIT_UNUSED
(
payload
);
return
GIT_PASSTHROUGH
;
}
static
int
repo_contains_no_reference
(
git_repository
*
repo
)
{
int
error
=
git_reference_foreach_name
(
repo
,
&
at_least_one_cb
,
NULL
);
git_reference_iterator
*
iter
;
const
char
*
refname
;
int
error
;
if
(
error
==
GIT_PASSTHROUGH
)
return
0
;
if
(
(
error
=
git_reference_iterator_new
(
&
iter
,
repo
))
<
0
)
return
error
;
if
(
!
error
)
error
=
git_reference_next_name
(
&
refname
,
iter
);
git_reference_iterator_free
(
iter
);
if
(
error
==
GIT_ITEROVER
)
return
1
;
return
error
;
...
...
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