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
41ad70d0
Commit
41ad70d0
authored
Jul 16, 2012
by
Ben Straub
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use git_blob__getbuf.
parent
71bc89b9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
9 deletions
+5
-9
src/checkout.c
+5
-9
No files found.
src/checkout.c
View file @
41ad70d0
...
@@ -19,6 +19,7 @@
...
@@ -19,6 +19,7 @@
#include "buffer.h"
#include "buffer.h"
#include "repository.h"
#include "repository.h"
#include "filter.h"
#include "filter.h"
#include "blob.h"
GIT_BEGIN_DECL
GIT_BEGIN_DECL
...
@@ -34,16 +35,11 @@ typedef struct tree_walk_data
...
@@ -34,16 +35,11 @@ typedef struct tree_walk_data
static
int
unfiltered_blob_contents
(
git_buf
*
out
,
git_repository
*
repo
,
const
git_oid
*
blob_id
)
static
int
unfiltered_blob_contents
(
git_buf
*
out
,
git_repository
*
repo
,
const
git_oid
*
blob_id
)
{
{
int
retcode
=
GIT_ERROR
;
int
retcode
=
GIT_ERROR
;
git_blob
*
blob
;
git_blob
*
blob
;
if
(
!
git_blob_lookup
(
&
blob
,
repo
,
blob_id
))
{
const
void
*
contents
=
git_blob_rawcontent
(
blob
);
if
(
!
(
retcode
=
git_blob_lookup
(
&
blob
,
repo
,
blob_id
)))
size_t
len
=
git_blob_rawsize
(
blob
);
retcode
=
git_blob__getbuf
(
out
,
blob
);
git_buf_clear
(
out
);
git_buf_set
(
out
,
(
const
char
*
)
contents
,
len
);
git_blob_free
(
blob
);
retcode
=
0
;
}
return
retcode
;
return
retcode
;
}
}
...
...
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