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
324f0eec
Commit
324f0eec
authored
Jul 13, 2011
by
Vicent Martí
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #325 from carlosmn/valgrind
More memory leaks
parents
18bdba0e
1a8167af
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
src/status.c
+4
-3
tests/t10-refs.c
+1
-0
No files found.
src/status.c
View file @
324f0eec
...
...
@@ -90,6 +90,7 @@ static void recurse_tree_entries(git_tree *tree, git_vector *entries, char *path
if
(
git_tree_lookup
(
&
subtree
,
tree
->
object
.
repo
,
&
tree_entry
->
oid
)
==
GIT_SUCCESS
)
{
recurse_tree_entries
(
subtree
,
entries
,
file_path
);
git_tree_close
(
subtree
);
return
;
}
...
...
@@ -100,8 +101,6 @@ static void recurse_tree_entries(git_tree *tree, git_vector *entries, char *path
git_oid_cpy
(
&
e
->
head_oid
,
&
tree_entry
->
oid
);
}
git_tree_close
(
tree
);
}
static
void
recurse_tree_entry
(
git_tree
*
tree
,
struct
status_entry
*
e
,
const
char
*
path
)
...
...
@@ -121,6 +120,7 @@ static void recurse_tree_entry(git_tree *tree, struct status_entry *e, const cha
if
(
tree_entry
!=
NULL
)
{
if
(
git_tree_lookup
(
&
subtree
,
tree
->
object
.
repo
,
&
tree_entry
->
oid
)
==
GIT_SUCCESS
)
{
recurse_tree_entry
(
subtree
,
e
,
dir_sep
+
1
);
git_tree_close
(
subtree
);
return
;
}
}
...
...
@@ -130,7 +130,6 @@ static void recurse_tree_entry(git_tree *tree, struct status_entry *e, const cha
if
(
tree_entry
!=
NULL
)
{
git_oid_cpy
(
&
e
->
head_oid
,
&
tree_entry
->
oid
);
}
git_tree_close
(
tree
);
}
struct
status_st
{
...
...
@@ -277,6 +276,7 @@ int git_status_foreach(git_repository *repo, int (*callback)(const char *, unsig
// recurse through tree entries
git_commit_tree
(
&
tree
,
head_commit
);
recurse_tree_entries
(
tree
,
&
entries
,
""
);
git_tree_close
(
tree
);
git_commit_close
(
head_commit
);
dirent_st
.
workdir_path_len
=
strlen
(
repo
->
path_workdir
);
...
...
@@ -342,6 +342,7 @@ int git_status_file(unsigned int *status_flags, git_repository *repo, const char
git_commit_tree
(
&
tree
,
head_commit
);
recurse_tree_entry
(
tree
,
e
,
path
);
git_tree_close
(
tree
);
git_commit_close
(
head_commit
);
// Find file in Workdir
...
...
tests/t10-refs.c
View file @
324f0eec
...
...
@@ -1064,6 +1064,7 @@ BEGIN_TEST(reflog0, "write a reflog for a given reference and ensure it can be r
must_be_true
(
strcmp
(
current_master_tip
,
entry
->
oid_cur
)
==
0
);
must_be_true
(
strcmp
(
commit_msg
,
entry
->
msg
)
==
0
);
git_signature_free
(
committer
);
git_reflog_free
(
reflog
);
close_temp_repo
(
repo2
);
END_TEST
...
...
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