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
555c81f3
Commit
555c81f3
authored
Feb 16, 2012
by
Vicent Martí
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #563 from schu/notes-fixup
notes: fix assert
parents
6117895f
0691966a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
src/notes.c
+3
-3
No files found.
src/notes.c
View file @
555c81f3
...
@@ -304,7 +304,7 @@ int git_note_read(git_note **out, git_repository *repo,
...
@@ -304,7 +304,7 @@ int git_note_read(git_note **out, git_repository *repo,
if
(
error
<
GIT_SUCCESS
)
if
(
error
<
GIT_SUCCESS
)
return
git__rethrow
(
error
,
"Failed to lookup reference `%s`"
,
notes_ref
);
return
git__rethrow
(
error
,
"Failed to lookup reference `%s`"
,
notes_ref
);
assert
(
git_ref_type
(
ref
)
==
GIT_REF_OID
);
assert
(
git_ref
erence
_type
(
ref
)
==
GIT_REF_OID
);
sha
=
git_reference_oid
(
ref
);
sha
=
git_reference_oid
(
ref
);
error
=
git_commit_lookup
(
&
commit
,
repo
,
sha
);
error
=
git_commit_lookup
(
&
commit
,
repo
,
sha
);
...
@@ -347,7 +347,7 @@ int git_note_create(git_oid *out, git_repository *repo,
...
@@ -347,7 +347,7 @@ int git_note_create(git_oid *out, git_repository *repo,
return
git__rethrow
(
error
,
"Failed to lookup reference `%s`"
,
notes_ref
);
return
git__rethrow
(
error
,
"Failed to lookup reference `%s`"
,
notes_ref
);
if
(
error
==
GIT_SUCCESS
)
{
if
(
error
==
GIT_SUCCESS
)
{
assert
(
git_ref_type
(
ref
)
==
GIT_REF_OID
);
assert
(
git_ref
erence
_type
(
ref
)
==
GIT_REF_OID
);
/* lookup existing notes tree oid */
/* lookup existing notes tree oid */
...
@@ -393,7 +393,7 @@ int git_note_remove(git_repository *repo, const char *notes_ref,
...
@@ -393,7 +393,7 @@ int git_note_remove(git_repository *repo, const char *notes_ref,
if
(
error
<
GIT_SUCCESS
)
if
(
error
<
GIT_SUCCESS
)
return
git__rethrow
(
error
,
"Failed to lookup reference `%s`"
,
notes_ref
);
return
git__rethrow
(
error
,
"Failed to lookup reference `%s`"
,
notes_ref
);
assert
(
git_ref_type
(
ref
)
==
GIT_REF_OID
);
assert
(
git_ref
erence
_type
(
ref
)
==
GIT_REF_OID
);
git_oid_cpy
(
&
sha
,
git_reference_oid
(
ref
));
git_oid_cpy
(
&
sha
,
git_reference_oid
(
ref
));
git_reference_free
(
ref
);
git_reference_free
(
ref
);
...
...
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