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
b918ae40
Commit
b918ae40
authored
Apr 08, 2011
by
Vicent Marti
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do not declare variables in the middle of a func
parent
41233c40
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
6 deletions
+3
-6
tests/resources/testrepo.git/objects/f6/0079018b664e4e79329a7ef9559c8d9e0378d1
+0
-0
tests/t09-tree.c
+3
-6
No files found.
tests/resources/testrepo.git/objects/f6/0079018b664e4e79329a7ef9559c8d9e0378d1
View file @
b918ae40
No preview for this file type
tests/t09-tree.c
View file @
b918ae40
...
...
@@ -134,12 +134,11 @@ BEGIN_TEST(write2, "write a tree from a memory")
git_repository
*
repo
;
git_treebuilder
*
builder
;
git_tree
*
tree
;
git_oid
id
;
git_oid
bid
;
git_oid
rid
;
git_oid
id
,
bid
,
rid
,
id2
;
must_pass
(
git_repository_open
(
&
repo
,
REPOSITORY_FOLDER
));
git_oid_mkstr
(
&
id
,
first_tree
);
git_oid_mkstr
(
&
id2
,
second_tree
);
git_oid_mkstr
(
&
bid
,
blob_oid
);
//create a second tree from first tree using `git_treebuilder_insert` on REPOSITORY_FOLDER.
...
...
@@ -148,9 +147,7 @@ BEGIN_TEST(write2, "write a tree from a memory")
must_pass
(
git_treebuilder_insert
(
NULL
,
builder
,
"new.txt"
,
&
bid
,
0100644
));
must_pass
(
git_treebuilder_write
(
&
rid
,
repo
,
builder
));
char
out
[
41
];
git_oid_to_string
(
out
,
41
,
&
rid
);
must_pass
(
strcmp
(
out
,
second_tree
));
must_be_true
(
git_oid_cmp
(
&
rid
,
&
id2
)
==
0
);
END_TEST
BEGIN_SUITE
(
tree
)
...
...
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