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
2c2cde47
Commit
2c2cde47
authored
Jun 06, 2012
by
Ben Straub
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix signatures for tree calls.
parent
56a5000d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
src/revparse.c
+4
-4
No files found.
src/revparse.c
View file @
2c2cde47
...
...
@@ -216,12 +216,12 @@ static int walk_ref_history(git_object **out, git_repository *repo, const char *
const
char
*
remote
;
git_buf_clear
(
&
buf
);
git_buf_printf
(
&
buf
,
"branch.%s.remote"
,
refspec
);
if
(
!
git_config_get_string
(
cfg
,
git_buf_cstr
(
&
buf
),
&
remote
))
{
if
(
!
git_config_get_string
(
&
remote
,
cfg
,
git_buf_cstr
(
&
buf
)
))
{
/* Yes. Find the first merge target name. */
const
char
*
mergetarget
;
git_buf_clear
(
&
buf
);
git_buf_printf
(
&
buf
,
"branch.%s.merge"
,
refspec
);
if
(
!
git_config_get_string
(
cfg
,
git_buf_cstr
(
&
buf
),
&
mergetarget
)
&&
if
(
!
git_config_get_string
(
&
mergetarget
,
cfg
,
git_buf_cstr
(
&
buf
)
)
&&
!
git__prefixcmp
(
mergetarget
,
"refs/heads/"
))
{
/* Success. Look up the target and fetch the object. */
git_buf_clear
(
&
buf
);
...
...
@@ -545,7 +545,7 @@ static const git_tree_entry* git_tree_entry_bypath(git_tree *tree, git_repositor
while
((
tok
=
git__strtok
(
&
str
,
"/
\\
"
))
!=
NULL
)
{
entry
=
git_tree_entry_byname
(
tree2
,
tok
);
if
(
tree2
!=
tree
)
git_tree_free
(
tree2
);
if
(
entry
_is_tree
(
entry
))
{
if
(
git_tree_entry_
_is_tree
(
entry
))
{
if
(
git_tree_lookup
(
&
tree2
,
repo
,
&
entry
->
oid
)
<
0
)
{
free
(
alloc
);
return
NULL
;
...
...
@@ -574,7 +574,7 @@ static int handle_colon_syntax(git_object **out,
/* Find the blob at the given path. */
entry
=
git_tree_entry_bypath
(
tree
,
repo
,
path
);
git_tree_free
(
tree
);
return
git_tree_entry_
2
object
(
out
,
repo
,
entry
);
return
git_tree_entry_
to_
object
(
out
,
repo
,
entry
);
}
static
int
git__revparse_global_grep
(
git_object
**
out
,
git_repository
*
repo
,
const
char
*
pattern
)
...
...
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