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
e00b56eb
Commit
e00b56eb
authored
Jun 15, 2012
by
Tim Clem
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix broken tests caused by no longer prettifying by default
parent
e4031cb5
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
6 deletions
+3
-6
src/commit.c
+2
-5
tests-clar/object/commit/commitstagedfile.c
+1
-1
No files found.
src/commit.c
View file @
e00b56eb
...
...
@@ -93,7 +93,7 @@ int git_commit_create(
int
parent_count
,
const
git_commit
*
parents
[])
{
git_buf
commit
=
GIT_BUF_INIT
,
cleaned_message
=
GIT_BUF_INIT
;
git_buf
commit
=
GIT_BUF_INIT
;
int
i
;
git_odb
*
odb
;
...
...
@@ -114,11 +114,9 @@ int git_commit_create(
git_buf_putc
(
&
commit
,
'\n'
);
if
(
git_buf_puts
(
&
commit
,
git_buf_cstr
(
&
cleaned_message
)
)
<
0
)
if
(
git_buf_puts
(
&
commit
,
message
)
<
0
)
goto
on_error
;
git_buf_free
(
&
cleaned_message
);
if
(
git_repository_odb__weakptr
(
&
odb
,
repo
)
<
0
)
goto
on_error
;
...
...
@@ -134,7 +132,6 @@ int git_commit_create(
on_error:
git_buf_free
(
&
commit
);
git_buf_free
(
&
cleaned_message
);
giterr_set
(
GITERR_OBJECT
,
"Failed to create commit."
);
return
-
1
;
}
...
...
tests-clar/object/commit/commitstagedfile.c
View file @
e00b56eb
...
...
@@ -61,7 +61,7 @@ void test_object_commit_commitstagedfile__generate_predictable_object_ids(void)
* 100644 blob 9daeafb9864cf43055ae93beb0afd6c7d144bfa4 test.txt
*/
cl_git_pass
(
git_oid_fromstr
(
&
expected_commit_oid
,
"
1fe3126578fc4eca68c193e4a3a0a14a0704624d
"
));
cl_git_pass
(
git_oid_fromstr
(
&
expected_commit_oid
,
"
b78d8ac0e448a305bf2806a00947ade8e8966d58
"
));
cl_git_pass
(
git_oid_fromstr
(
&
expected_tree_oid
,
"2b297e643c551e76cfa1f93810c50811382f9117"
));
cl_git_pass
(
git_oid_fromstr
(
&
expected_blob_oid
,
"9daeafb9864cf43055ae93beb0afd6c7d144bfa4"
));
...
...
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