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
1e9b7a09
Commit
1e9b7a09
authored
Jun 02, 2011
by
Vicent Martí
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #144 from nordsturm/fix_fakewstream
Fix fake wstream write
parents
7107b599
1d1735fe
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
+5
-2
src/blob.c
+4
-1
src/odb.c
+1
-1
No files found.
src/blob.c
View file @
1e9b7a09
...
...
@@ -64,7 +64,10 @@ int git_blob_create_frombuffer(git_oid *oid, git_repository *repo, const void *b
if
((
error
=
git_odb_open_wstream
(
&
stream
,
repo
->
db
,
len
,
GIT_OBJ_BLOB
))
<
GIT_SUCCESS
)
return
git__rethrow
(
error
,
"Failed to create blob"
);
stream
->
write
(
stream
,
buffer
,
len
);
if
((
error
=
stream
->
write
(
stream
,
buffer
,
len
))
<
GIT_SUCCESS
)
{
stream
->
free
(
stream
);
return
error
;
}
error
=
stream
->
finalize_write
(
oid
,
stream
);
stream
->
free
(
stream
);
...
...
src/odb.c
View file @
1e9b7a09
...
...
@@ -170,7 +170,7 @@ static int fake_wstream__write(git_odb_stream *_stream, const char *data, size_t
{
fake_wstream
*
stream
=
(
fake_wstream
*
)
_stream
;
if
(
stream
->
written
+
len
>
=
stream
->
size
)
if
(
stream
->
written
+
len
>
stream
->
size
)
return
GIT_ENOMEM
;
memcpy
(
stream
->
buffer
+
stream
->
written
,
data
,
len
);
...
...
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