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
3b49b0a7
Commit
3b49b0a7
authored
Nov 03, 2016
by
Carlos Martín Nieto
Committed by
GitHub
Nov 03, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3987 from libgit2/cmn/update-v24
Backport the object parsing fixes
parents
8e268168
f061aa85
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
6 deletions
+17
-6
script/cibuild.sh
+7
-2
src/commit.c
+4
-3
src/tree.c
+6
-1
No files found.
script/cibuild.sh
View file @
3b49b0a7
...
...
@@ -44,8 +44,13 @@ ssh-keygen -t rsa -f ~/.ssh/id_rsa -N "" -q
cat
~/.ssh/id_rsa.pub
>>
~/.ssh/authorized_keys
ssh-keyscan
-t
rsa localhost
>>
~/.ssh/known_hosts
# Get the fingerprint for localhost and remove the colons so we can parse it as a hex number
export
GITTEST_REMOTE_SSH_FINGERPRINT
=
$(
ssh-keygen
-F
localhost
-l
| tail
-n
1 | cut
-d
' '
-f
2 | tr
-d
':'
)
# Get the fingerprint for localhost and remove the colons so we can parse it as
# a hex number. The Mac version is newer so it has a different output format.
if
[
"
$TRAVIS_OS_NAME
"
=
"osx"
]
;
then
export
GITTEST_REMOTE_SSH_FINGERPRINT
=
$(
ssh-keygen
-E
md5
-F
localhost
-l
| tail
-n
1 | cut
-d
' '
-f
3 | cut
-d
:
-f2-
| tr
-d
:
)
else
export
GITTEST_REMOTE_SSH_FINGERPRINT
=
$(
ssh-keygen
-F
localhost
-l
| tail
-n
1 | cut
-d
' '
-f
2 | tr
-d
':'
)
fi
export
GITTEST_REMOTE_URL
=
"ssh://localhost/
$HOME
/_temp/test.git"
export
GITTEST_REMOTE_USER
=
$USER
...
...
src/commit.c
View file @
3b49b0a7
...
...
@@ -410,10 +410,11 @@ int git_commit__parse(void *_commit, git_odb_object *odb_obj)
buffer
=
buffer_start
+
header_len
+
1
;
/* extract commit message */
if
(
buffer
<=
buffer_end
)
{
if
(
buffer
<=
buffer_end
)
commit
->
raw_message
=
git__strndup
(
buffer
,
buffer_end
-
buffer
);
GITERR_CHECK_ALLOC
(
commit
->
raw_message
);
}
else
commit
->
raw_message
=
git__strdup
(
""
);
GITERR_CHECK_ALLOC
(
commit
->
raw_message
);
return
0
;
...
...
src/tree.c
View file @
3b49b0a7
...
...
@@ -447,7 +447,12 @@ int git_tree__parse(void *_tree, git_odb_object *odb_obj)
if
((
nul
=
memchr
(
buffer
,
0
,
buffer_end
-
buffer
))
==
NULL
)
return
tree_error
(
"Failed to parse tree. Object is corrupted"
,
NULL
);
filename_len
=
nul
-
buffer
;
if
((
filename_len
=
nul
-
buffer
)
==
0
)
return
tree_error
(
"Failed to parse tree. Can't parse filename"
,
NULL
);
if
((
buffer_end
-
(
nul
+
1
))
<
GIT_OID_RAWSZ
)
return
tree_error
(
"Failed to parse tree. Can't parse OID"
,
NULL
);
/* Allocate the entry */
{
entry
=
git_array_alloc
(
tree
->
entries
);
...
...
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